#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include "ellLib.h"
#include "epicsMutex.h"
#include "epicsThread.h"
Go to the source code of this file.
Register a routine to be called by every new thread before the thread function gets run. Hook routines will often register a thread exit routine with epicsAtThreadExit() to release thread-specific resources they have allocated.
Definition at line 54 of file osdThreadHooks.c.
63 fprintf(
stderr,
"epicsThreadHookAdd: calloc failed\n");
73 fprintf(
stderr,
"epicsThreadHookAdd: Locking problem\n");
void epicsStdCall epicsMutexUnlock(epicsMutexId pmutexNode)
Release the semaphore.
void ellAdd(ELLLIST *pList, ELLNODE *pNode)
Adds a node to the end of a list.
epicsMutexLockStatus epicsStdCall epicsMutexLock(epicsMutexId pmutexNode)
Claim the semaphore, waiting until it's free if currently owned owned by a different thread...
EPICS_THREAD_HOOK_ROUTINE func
Remove routine from the list of hooks run at thread creation time.
Definition at line 77 of file osdThreadHooks.c.
86 if (hook == pHook->
func) {
95 fprintf(
stderr,
"epicsThreadHookAdd: Locking problem\n");
void epicsStdCall epicsMutexUnlock(epicsMutexId pmutexNode)
Release the semaphore.
#define ellNext(PNODE)
Find the next node in list.
epicsMutexLockStatus epicsStdCall epicsMutexLock(epicsMutexId pmutexNode)
Claim the semaphore, waiting until it's free if currently owned owned by a different thread...
EPICS_THREAD_HOOK_ROUTINE func
void ellDelete(ELLLIST *pList, ELLNODE *pNode)
Deletes a node from a list.
#define ellFirst(PLIST)
Find the first node in list.
LIBCOM_API void epicsThreadHooksShow |
( |
void |
| ) |
|
Print the current list of hook function pointers.
Definition at line 123 of file osdThreadHooks.c.
137 fprintf(
stderr,
"epicsThreadHooksShow: Locking problem\n");
void epicsStdCall epicsMutexUnlock(epicsMutexId pmutexNode)
Release the semaphore.
#define ellNext(PNODE)
Find the next node in list.
epicsMutexLockStatus epicsStdCall epicsMutexLock(epicsMutexId pmutexNode)
Claim the semaphore, waiting until it's free if currently owned owned by a different thread...
EPICS_THREAD_HOOK_ROUTINE func
#define ellFirst(PLIST)
Find the first node in list.
Definition at line 105 of file osdThreadHooks.c.
119 fprintf(
stderr,
"osdThreadHooksRun: Locking problem\n");
void epicsStdCall epicsMutexUnlock(epicsMutexId pmutexNode)
Release the semaphore.
#define ellNext(PNODE)
Find the next node in list.
epicsMutexLockStatus epicsStdCall epicsMutexLock(epicsMutexId pmutexNode)
Claim the semaphore, waiting until it's free if currently owned owned by a different thread...
EPICS_THREAD_HOOK_ROUTINE func
#define ellFirst(PLIST)
Find the first node in list.
Definition at line 99 of file osdThreadHooks.c.
LIBCOM_API EPICS_THREAD_HOOK_ROUTINE epicsThreadHookMain