diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-16 09:42:36 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-16 09:42:36 +0200 |
commit | e005c5569c3e0c7c9a098036b7ec3596c3c722b4 (patch) | |
tree | 3a130a168de2e9b3aa3cc4c8a4eb46d4cc62e35a /threads.c | |
parent | d9f1a16de4723f9e096fa9abe47e8a845c815df0 (diff) | |
download | rsyslog-e005c5569c3e0c7c9a098036b7ec3596c3c722b4.tar.gz rsyslog-e005c5569c3e0c7c9a098036b7ec3596c3c722b4.tar.xz rsyslog-e005c5569c3e0c7c9a098036b7ec3596c3c722b4.zip |
some minor cleanup, consolidated some code
Diffstat (limited to 'threads.c')
-rw-r--r-- | threads.c | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -250,29 +250,5 @@ rsRetVal thrdExit(void) } -/* thrdSleep() - a fairly portable way to put a thread to sleep. It - * will wake up when - * a) the wake-time is over - * b) the thread shall be terminated - * Returns RS_RET_OK if all went well, RS_RET_TERMINATE_NOW if the calling - * thread shall be terminated and any other state if an error happened. - * rgerhards, 2007-12-17 - */ -rsRetVal -thrdSleep(thrdInfo_t *pThis, int iSeconds, int iuSeconds) -{ - DEFiRet; - struct timeval tvSelectTimeout; - - assert(pThis != NULL); - tvSelectTimeout.tv_sec = iSeconds; - tvSelectTimeout.tv_usec = iuSeconds; /* micro seconds */ - select(1, NULL, NULL, NULL, &tvSelectTimeout); - if(pThis->bShallStop) - iRet = RS_RET_TERMINATE_NOW; - RETiRet; -} - - /* vi:set ai: */ |