![]() |
BlitzMax Extended
0.8.19
Pushing Blitz to the Max.
|
Functionality to utilize multi-threading capabilities. More...
#include "_common.h"#include <pthread.h>#include <unistd.h>#include <signal.h>Go to the source code of this file.
Data Structures | |
| struct | BBThread |
| Represents a single thread of execution. More... | |
Typedefs | |
| typedef BBObject *(* | BBThreadProc )(BBObject *) |
| Signature of a function that contains the thread's logic. | |
Functions | |
| BBThread * | bbThreadCreate (BBThreadProc entry, BBObject *data) |
| Creates a new thread. | |
| BBThread * | bbThreadGetMain () |
| Gets the application's main thread of execution. | |
| BBThread * | bbThreadGetCurrent () |
| Gets the current thread in which a function is running. | |
| BBInt | bbAtomicAdd (volatile BBInt *target, BBInt incr) |
| Atomically adds a number to an integer. | |
Functionality to utilize multi-threading capabilities.
Signature of a function that contains the thread's logic.
Atomically adds a number to an integer.
| target | A pointer to the value that should be increased |
| incr | The number which will be added to the target number |
| BBThread* bbThreadCreate | ( | BBThreadProc | entry, |
| BBObject * | data | ||
| ) |
Creates a new thread.
| entry | The callback function executing the thread's business logic data Data passed to the callback functio |
| BBThread* bbThreadGetCurrent | ( | ) |
Gets the current thread in which a function is running.
Can be used with bbThreadGetMain to determine if a code section is currently being executed in the main thread.
| BBThread* bbThreadGetMain | ( | ) |
Gets the application's main thread of execution.
1.8.1.1