1 #ifndef LIBRARIES_THREADPOOL_H 2 #define LIBRARIES_THREADPOOL_H 3 4 /* 5 * Copyright © 2012-2014 The MorphOS Development Team 6 * 7 */ 8 9 #ifndef DOS_DOSTAGS_H 10 #include <dos/dostags.h> 11 #endif 12 13 #ifndef EXEC_PORTS_H 14 #include <exec/ports.h> 15 #endif 16 17 typedef VOID (*THREADFUNC)(APTR UserData, struct MsgPort *port); 18 19 #define THREADPOOL_MaxIdleThreads (TAG_USER + 0) 20 #define THREADPOOL_DataSegment (TAG_USER + 1) /* Small data pointer */ 21 #define THREADPOOL_Priority NP_Priority /* Default is 0 */ 22 #define THREADPOOL_Name NP_Name 23 24 #define WORKITEM_INVALID -1 25 #define WORKITEM_ANY -2 26 27 typedef enum 28 { 29 WORKITEMSTATUS_NOT_FOUND = -1, 30 WORKITEMSTATUS_EXECUTING = 0, 31 WORKITEMSTATUS_PENDING = 1, 32 33 } WORKITEMSTATUS; 34 35 #endif /* LIBRARIES_THREADPOOL_H */ 36