1 #ifndef CLIB_THREADPOOL_PROTOS_H
    2 #define CLIB_THREADPOOL_PROTOS_H
    3 
    4 /*
    5  * Copyright © 2012-2014 The MorphOS Development Team
    6  *
    7  */
    8 
    9 #ifndef _SYS_TYPES_H_
   10 #include <sys/types.h>
   11 #endif
   12 
   13 #ifndef EXEC_PORTS_H
   14 #include <exec/ports.h>
   15 #endif
   16 
   17 #ifndef LIBRARIES_THREADPOOL_H
   18 #include <libraries/threadpool.h>
   19 #endif
   20 
   21 #include <sys/types.h>
   22 
   23 #ifdef __cplusplus
   24 extern "C" {
   25 #endif /* __cplusplus */
   26 
   27 APTR CreateThreadPoolTagList(ULONG maxthreads, CONST struct TagItem *TagItems);
   28 VOID DeleteThreadPool(APTR threadpool);
   29 ssize_t QueueWorkItem(APTR threadpool, THREADFUNC entry, APTR userdata);
   30 BOOL SendWorkItemMessage(APTR threadpool, ssize_t work_id, struct Message *message);
   31 WORKITEMSTATUS AbortWorkItem(APTR threadpool, ssize_t work_id);
   32 BOOL AbortWorkQueue(APTR threadpool);
   33 WORKITEMSTATUS CheckWorkItem(APTR threadpool, ssize_t work_id);
   34 BOOL CheckWorkQueue(APTR threadpool);
   35 VOID WaitWorkItem(APTR threadpool, ssize_t work_id);
   36 VOID WaitWorkQueue(APTR threadpool);
   37 BOOL IsCurrentThread(APTR threadpool, ssize_t work_id);
   38 WORKITEMSTATUS SignalWorkItem(APTR threadpool, ssize_t work_id, ULONG signalmask);
   39 ssize_t GetCurrentWorkItem(APTR threadpool);
   40 
   41 #if !defined(USE_INLINE_STDARG)
   42 APTR CreateThreadPoolTags(ULONG maxthreads, Tag tag1Type, ... );
   43 #endif
   44 
   45 #ifdef __cplusplus
   46 }
   47 #endif /* __cplusplus */
   48 
   49 #endif /* CLIB_THREADPOOL_PROTOS_H */