File: threadlib.h

package info (click to toggle)
streamripper 1.61.7-1sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,216 kB
  • ctags: 757
  • sloc: sh: 8,778; ansic: 6,138; makefile: 236
file content (28 lines) | stat: -rw-r--r-- 869 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef __THREADLIB_H__
#define __THREADLIB_H__

#include "types.h"
#include "compat.h"

typedef struct THREAD_HANDLEst
{
	THANDLE thread_handle;
} THREAD_HANDLE;


/*********************************************************************************
 * Public functions
 *********************************************************************************/
extern error_code	threadlib_beginthread(THREAD_HANDLE *thread, void (*callback)(void *));
extern BOOL		threadlib_isrunning(THREAD_HANDLE *thread);
extern void		threadlib_waitforclose(THREAD_HANDLE *thread);
extern void		threadlib_endthread(THREAD_HANDLE *thread);
extern BOOL		threadlib_sem_signaled(HSEM *e);

extern HSEM		threadlib_create_sem();
extern error_code	threadlib_waitfor_sem(HSEM *e);
extern error_code	threadlib_signel_sem(HSEM *e);
extern void		threadlib_destroy_sem(HSEM *e);


#endif //__THREADLIB__