TOBA

Runtime Support Functions


These functions may be useful in constructing native code functions for use with Toba.

Allocation

Helpers

Miscellaneous helper functions.

File Operations

The functions in file.c are a collection of common file/IO operations performed by the API native functions. Before using these functions the source code should be consulted.

Throw Operations

There are additional wrapper functions for throwing many particular exceptions (e.g., throwNullPointerException); see the source for the current list.

Monitor Operations

Threads

Thread Primitives

The Sumatra-Threads (or sthreads) layer defines the lowest level thread primitives. Most of these primitives map directly to the underlying machine-specific thread package. Care should be used when using these primitives as they could have adverse interactions with the rest of the system. For example, grabbing an internal lock without telling the thread package not to kill you could result in a deadlock if another thread tries to kill you at a bad time.

The sthreads package exports three data types:

These three data types correspond directly with primitives of the underlying (machine-dependent) threads package.

Sthread Thread Operations

The following routines are used to prevent a thread from being killed for a short amount of time. They are meant to be used to protect threads from being killed or suspended while holding critical internal locks, such as the monitor creation lock and the allocation lock. These routines should only be used sparingly, for short amounts of time, and with careful consideration. Inside of the critical sections defined using these routines, the current thread cannot be killed or suspended by the API.

Sthread Mutex Operations

Sthread Miscellaneous Operations


index | usage | differences | native code | implementation | porting | releases | installation || home
http://www.cs.arizona.edu/sumatra/toba/doc/runfuncs.html (July, 1998)