summaryrefslogtreecommitdiffstats
path: root/threads.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-17 09:06:23 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-17 09:06:23 +0000
commit18dbfe70d804f6436658e8dd0af79188333e165a (patch)
tree5a89356fbad257f65a5ab8ed3bf8a77b84096678 /threads.h
parent0a8e339bfeeb65bbd52264fab68cc13dd99d50e7 (diff)
downloadrsyslog-18dbfe70d804f6436658e8dd0af79188333e165a.tar.gz
rsyslog-18dbfe70d804f6436658e8dd0af79188333e165a.tar.xz
rsyslog-18dbfe70d804f6436658e8dd0af79188333e165a.zip
moved thread termination code out to threads.c
Diffstat (limited to 'threads.h')
-rw-r--r--threads.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/threads.h b/threads.h
index 9ed6b2b3..30551505 100644
--- a/threads.h
+++ b/threads.h
@@ -34,7 +34,8 @@ typedef enum eTermSyncType {
typedef struct thrdInfo {
eTermSyncType_t eTermTool;
int bIsActive; /* Is thread running? */
- rsRetVal (*pUsrThrdMain)(void); /* user thread main to be called in new thread */
+ int bShallStop; /* set to 1 if the thread should be stopped ? */
+ rsRetVal (*pUsrThrdMain)(struct thrdInfo*); /* user thread main to be called in new thread */
pthread_t thrdID;
} thrdInfo_t;
@@ -54,7 +55,8 @@ rsRetVal thrdExit(void);
rsRetVal thrdInit(void);
rsRetVal thrdTerminate(thrdInfo_t *pThis);
rsRetVal thrdTerminateAll(void);
-rsRetVal thrdCreate(rsRetVal (*thrdMain)(void), eTermSyncType_t eTermSyncType);
+rsRetVal thrdCreate(rsRetVal (*thrdMain)(thrdInfo_t*), eTermSyncType_t eTermSyncType);
+rsRetVal thrdSleep(thrdInfo_t *pThis, int iSeconds, int iuSeconds);
msgQueue *queueInit (void);
void queueDelete (msgQueue *q);
void queueAdd (msgQueue *q, void* in);