Sack Library Documentation
|
This namespace contains methods for working with timers and threads. Since timers are implemented in an asynchronous thread, the thread creation and control can be exposed here also.
WakeableSleep [Example]
EnterCriticalSec see Also EnterCriticalSecNoWait
Name |
Description |
The following table lists functions in this documentation. | |
The following table lists structs, records, enums in this documentation. | |
The following table lists types in this documentation. | |
The following table lists macros 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. | |
| ||
|
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. | |
| ||
| ||
|
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. | |
| ||
|
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) | |
| ||
|
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. | |
|
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. | |
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. | |
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). | |
This is macro sack::timers::EnterCriticalSecNoWait. | |
A custom implementation of windows CRITICAL_SECTION api. Provides same capability for Linux type systems. Can be checked as a study in how to implement safe locks. | |
This tests to see if a pointer to a thread references the current thread. | |
Leaves a critical section. See EnterCriticalSecEx. | |
Symbol defined to pass to Wakeable_Sleep to sleep until someone calls WakeThread. | |
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) | |
Defines import export and call method for timers. Looks like timers are native calltype by default instead of CPROC. | |
Wake a thread. | |
|
Name |
Description |
|
A custom implementation of windows CRITICAL_SECTION api. Provides same capability for Linux type systems. Can be checked as a study in how to implement safe locks. |
Name |
Description |
A custom implementation of windows CRITICAL_SECTION api. Provides same capability for Linux type systems. Can be checked as a study in how to implement safe locks. | |
This is type sack::timers::PCRITICALSECTION. | |
This is the type returned by MakeThread, and passed to ThreadTo. This is a private structure, and no definition is publicly available, this should be treated like a handle. | |
Function signature for a thread entry point passed to ThreadToSimple. | |
Function signature for a thread entry point passed to ThreadTo. | |
Function signature for user callbacks passed to AddTimer. |
Copyright (c) 2000+. All rights reserved.
|
What do you think about this topic? Send feedback!
|