20 #ifndef KERNEL_UTILITIES_PRODUCERCONSUMER_H 21 #define KERNEL_UTILITIES_PRODUCERCONSUMER_H 23 #if defined(THREADS) || defined(UTILITY_LINUX) 24 #define PRODUCERCONSUMER_ASYNCHRONOUS 1 26 #define PRODUCERCONSUMER_ASYNCHRONOUS 0 29 #include "pedigree/kernel/compiler.h" 30 #include "pedigree/kernel/utilities/new" 32 #if PRODUCERCONSUMER_ASYNCHRONOUS 33 #include "pedigree/kernel/process/ConditionVariable.h" 34 #include "pedigree/kernel/process/Mutex.h" 35 #include "pedigree/kernel/processor/types.h" 36 #include "pedigree/kernel/utilities/List.h" 61 uint64_t p0 = 0, uint64_t p1 = 0, uint64_t p2 = 0, uint64_t p3 = 0,
62 uint64_t p4 = 0, uint64_t p5 = 0, uint64_t p6 = 0, uint64_t p7 = 0,
67 uint64_t p0, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4,
68 uint64_t p5, uint64_t p6, uint64_t p7, uint64_t p8) = 0;
70 void consumerThread();
72 static int thread(
void *p);
76 uint64_t p0, p1, p2, p3, p4, p5, p6, p7, p8;
79 #if PRODUCERCONSUMER_ASYNCHRONOUS 84 void *m_pThreadHandle =
nullptr;
85 bool m_Running =
false;