IP Library Granted Patent US 7,877,629
Granted Patent B2
US 7,877,629 · App. 11/142,227 · Granted Jan 25, 2011

Facilitating handling of exceptions in a program implementing a M-on-N threading model

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,877,629
App. No.
11/142,227
Granted
Jan 25, 2011
Kind
B2
Abstract

A method for facilitating handling of exceptions in object code transformed from a 1-to-1 threading model to a M-to-N threading model comprises transforming object code having a 1-to-1 threading model to a M-to-N threading model, saving context of a Runnable section of the object code into a context object in response to an exception occurring and rethrowing the exception after performing the saving. The transforming includes creating a Boolean enable value in a method context for an exception handler in the method context, mapping an exception type to the exception handler and wrapping a Runnable section of the object code within a respective synthetic exception handler. The respective synthetic exception handler is configured for saving context of the object code Runnable into a context object in response to an exception occurring and rethrowing the exception after performing the saving.

Claims (43)

1. A method for facilitating handling of exceptions in object code having a M-to-N threading model, comprising: creating a Boolean enable value in a method context of said object code for an exception handler in the method context, wherein the Boolean enable value designates whether an exception handler of an appropriate type is enabled; mapping an exception type to the exception handler, wherein the object code Runnable uses the Boolean enable value to determine whether the exception handler is an appropriate exception handler, and wherein an appropriate exception handler is an available exception handler that matches the exception type; saving context of an object code Runnable into a context object in response to an exception occurring; and rethrowing the exception after performing said saving.

2. The method of claim 1 , further comprising:

running the object code Runnable after performing said rethrowing;

catching the exception in response to performing said running; and

querying a current method context of a stack of method contexts for determining whether an appropriate exception handler for the exception is available.

3. The method of claim 2 , further comprising:

scheduling the exception handler to run in response to determining that appropriate exception handler is available in the current method context; and

popping the current method context off of the stack in response to determining that the appropriate exception handler is not available in the current method context and querying a next method context of the stack of method contexts for determining whether the appropriate exception handler for the exception is available in the next method context.

4. The method of claim 3 , further comprising:

remembering that the exception is being handled in response to an appropriate exception handler being available and in response to a Runnable of the appropriate exception handler yielding control to another thread; and

resuming the Runnable of the appropriate exception handler after yielding control to said another thread.

5. The method of claim 1 , further comprising:

wrapping the Runnable section of said object code within a respective synthetic exception handler, wherein the respective synthetic exception handler is configured for performing said saving and said rethrowing.

6. The method of claim 5 , further comprising:

running the object code Runnable after performing said rethrowing;

catching the exception in response to performing said running; and

querying a current method context of a stack of method contexts for determining whether the appropriate exception handler for the exception is available.

7. The method of claim 6 , further comprising:

scheduling the exception handler to run in response to determining that the appropriate exception handler is available in the current method context; and

popping the current method context off of the stack in response to determining that the appropriate exception handler is not available in the current method context and querying a next method context of the stack of method contexts for determining whether the appropriate exception handier for the exception is available in the next method context.

8. The method of claim 7 , further comprising:

remembering that the exception is being handled in response to the appropriate exception handler being available and in response to a Runnable of the appropriate exception handler yielding control to another thread; and

resuming the Runnable of the appropriate exception handler after yielding control to said another thread.

9. A method for transforming object code from a 1-to-1 threading model to a M-to-N threading model, comprising:

creating a Boolean enable value in a method context for an exception handler in the method context, wherein the Boolean enable value designates whether an exception handler of an appropriate type is enabled in the current method context;

mapping an exception type to the exception handler, wherein the object code Runnable uses the Boolean enable value to determine whether the exception handler is an appropriate exception handler, and wherein an appropriate exception handler is an available exception handler that matches the exception type;

mapping an entry point for the exception handler to the exception type and

wrapping a Runnable section of said object code within a respective synthetic exception handler, wherein the respective synthetic exception handler is configured for saving context of the object code Runnable into a context object in response to an exception occurring and for rethrowing the exception after performing said saving.

10. A method for facilitating handling exceptions in object code transformed from a 1-to-1 threading model to a M-to-N threading model, comprising:

transforming object code having a 1-to-1 threading model to a M-to-N threading model, wherein said transforming includes creating a Boolean enable value in a method context for an exception handler in the method context, mapping an exception type to the exception handler and wrapping a Runnable section of said object code within a respective synthetic exception handler, wherein the Boolean enable value designates whether an exception handler of an appropriate type is enabled wherein an appropriate exception handler is an available exception handler that matches the exception type, and wherein the respective synthetic exception handler is configured for saving context of the object code Runnable into a context object in response to an exception occurring and for rethrowing the exception after performing said saving;

saving context of a object code Runnable into a context object in response to an exception occurring; and

rethrowing the exception after performing said saving.

11. The method of claim 10 , further comprising mapping an entry point for the exception handler to the exception type.

12. The method of claim 10 , further comprising:

running the object code Runnable after performing said rethrowing;

catching the exception in response to performing said running; and

querying a current method context of a stack of method contexts for determining whether the appropriate exception handler for the exception is available.

13. The method of claim 12 , further comprising:

scheduling the exception handler to run in response to determining that the appropriate exception handler is available in the current method context; and

popping the current method context off of the stack in response to determining that the appropriate exception handler is not available in the current method context and querying a next method context of the stack of method contexts for determining whether the appropriate exception handler for the exception is available in the next method context.

14. The method of claim 13 , further comprising:

remembering that the exception is being handled in response to the appropriate exception handler being available and in response to a Runnable of the appropriate exception handler yielding control to another thread; and

resuming the Runnable of the appropriate exception handler after yielding control to said another thread.

Assignments (5)
RELEASE OF SECURITY INTEREST Recorded Jun 5, 2019
From: U.S. BANK NATIONAL ASSOCIATION, SOLELY AS NOTES COLLATERAL AGENT
To: SANMINA CORPORATION; HADCO CORPORATION; HADCO SANTA CLARA; SCI TECHNOLOGY; SENSORWISE, INC.
Reel/Frame 049378/0927 →
SECURITY INTEREST Recorded Aug 3, 2018
From: SANMINA CORPORATION
To: U.S. BANK NATIONAL ASSOCIATION, NOT IN ITS INDIVIDUAL CAPACITY BUT SOLELY AS NOTES COLLATERAL AGENT
Reel/Frame 046797/0063 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 26, 2018
From: MEMORY INTEGRITY, LLC
To: SANMINA CORPORATION
Reel/Frame 046249/0843 →
MERGER Recorded Nov 28, 2012
From: SANMINA-SCI CORPORATION
To: SANMINA CORPORATION
Reel/Frame 029368/0472 →
MERGER Recorded Jul 27, 2012
From: NEWISYS, INC.
To: SANMINA-SCI CORPORATION
Reel/Frame 028652/0891 →