Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
Functions

The following table lists functions in this documentation.

 
Name 
Description 
 
Adds a new periodic timer. From now, until the timer is removed with RemoveTimer, it will call the timer procedure at the specified frequency of milliseconds. The delay until the first time the timer fires can be specified independant of frequency. If it is not specified, the first time the timer will get invoked is at +1 frequency from now. 
 
Changes the frequency of a timer. Reschedule timer only changes the next time it fires, this can adjust the frequency. The simple ChangeTimer macro is sufficient. 
 
Does nothing. There are no extra resources required for critical sections, and the memory is allocated by the application. 
 
TIMER_PROC( void, WakeThread )( PTHREAD thread ); 
 
Enter a critical section. Only a single thread may be in a critical section, if a second thread attempts to enter the section while another thread is in it will block until the original thread leaves the section. The same thread may enter a critical section multiple times. For each time a critical section is entered, the thread must also leave the critical section (See LeaveCriticalSection). 
 
attempts to enter the critical section, and does not block. 
 
returns the numeric THREAD_ID from a PTHREAD
 
returns the numeric THREAD_ID from a PTHREAD
 
This returns the parameter passed as user data to ThreadTo
 
attempts to enter the critical section, and does not block. 
 
This tests to see if a pointer to a thread references the current thread. 
 
Leaves a critical section. See EnterCriticalSecEx
 
Returns a PTHREAD that represents the current thread. This can be used to create a PTHREAD identifier for the main thread. 
 
Stops a timer. The next time this timer would run, it will be removed. If it is currently dispatched, it is safe to remove from within the timer itself. 
 
Reschedule when a timer can fire. The delay can be 0 to make wake the timer. 
 
Reschedule when a timer can fire. The delay can be 0 to make wake the timer. 
 
This can be checked to see if the PTHREAD to wake still has an event. Sometimes threads call UnmakeThread(). This is a more practical test using a THREAD_ID instead. See TestWakeThreadID
 
This can be checked to see if the THREAD_ID to wake still has an event. Sometimes threads end. 
 
Create a separate thread that starts in the routine specified. The PTRSZVAL value (something that might be a pointer), is passed in the PTHREAD structure. (See GetThreadParam
 
Create a separate thread that starts in the routine specified. The PTRSZVAL value (something that might be a pointer), is passed in the PTHREAD structure. (See GetThreadParam
 
Releases resources associated with a PTHREAD. For purposes of waking a thread, and providing a wakeable point for the thread, a system blocking event object is allocated, named with the THREAD_ID so it can be referenced by other processes. This is only allowed to be done by the thread itself. 
 
Sleeps a number of milliseconds or until the thread is passed to WakeThread
 
Sleeps a number of milliseconds or until the thread is passed to WakeThread
 
Wake a thread. 
 
Wake a thread by ID, if the pThread is not available. Can be used cross-process for instance. Although someone could add a method to provide a PTHREAD wrapper around THREAD_ID for threads in remote processes, this may not be a best practice. 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!