#include "nsthread.h"#include <pthread.h>Defines | |
| #define | PTHREAD_TEST 1 |
| #define | NA 10000 |
Functions | |
| void | Msg (char *fmt,...) |
| void | TlsLogArg (void *arg) |
| int | RecursiveStackCheck (int n) |
| void | CheckStackThread (void *arg) |
| void | WorkThread (void *arg) |
| void | AtExit (void) |
| void | MemThread (void *arg) |
| void | MemTime (int ns) |
| void | DumpString (Tcl_DString *dsPtr) |
| void | DumperThread (void *arg) |
| void | PthreadTlsCleanup (void *arg) |
| void * | Pthread (void *arg) |
| int | main (int argc, char *argv[]) |
Variables | |
| int | nthreads = 10 |
| int | memstart |
| int | nrunning |
| #define NA 10000 |
MemThread, MemTime -
Time allocations of malloc and zippy ns_malloc.
| #define PTHREAD_TEST 1 |
Special direct include of pthread.h for compatibility tests.
| void AtExit | ( | void | ) |
AtExit -
Test of atexit() handler.
| void CheckStackThread | ( | void * | arg | ) |
| void DumperThread | ( | void * | arg | ) |
| void DumpString | ( | Tcl_DString * | dsPtr | ) |
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
main -
Fire off a bunch of weird threads to exercise the thread interface.
Jump directly to memory test if requested.
Ns_CondSignal(&cond);
Ns_ThreadEnum(DumpThreads, NULL);
Ns_MutexEnum(DumpLocks, NULL);
| void MemThread | ( | void * | arg | ) |
| void MemTime | ( | int | ns | ) |
| void Msg | ( | char * | fmt, | |
| ... | ||||
| ) |
Msg -
Simple message logger with thread id and name.
| void* Pthread | ( | void * | arg | ) |
| void PthreadTlsCleanup | ( | void * | arg | ) |
| int RecursiveStackCheck | ( | int | n | ) |
RecursiveStackCheck, CheckStackThread -
Thread which recursively probes stack for max depth.
| void TlsLogArg | ( | void * | arg | ) |
TlsLogArg -
Log and then free TLS slot data at thread exit.
| void WorkThread | ( | void * | arg | ) |
WorkThread -
Thread which exercies a varity of sync objects and TLS.
| int memstart |
| int nrunning |
| int nthreads = 10 |
1.5.1