Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > pthread > pthread__k_tuple__async
comparison src/Application/main.h @ 1:88db7b62b961
Working queue based version
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 10 Jul 2013 14:17:04 -0700 |
| parents | 9cf9b2091eeb |
| children |
comparison
equal
deleted
inserted
replaced
| 0:5603505a21cf | 1:276f9ce8a7be |
|---|---|
| 11 #include <sched.h> | 11 #include <sched.h> |
| 12 #include <unistd.h> | 12 #include <unistd.h> |
| 13 | 13 |
| 14 #include <linux/perf_event.h> | 14 #include <linux/perf_event.h> |
| 15 #include <sys/syscall.h> | 15 #include <sys/syscall.h> |
| 16 | |
| 17 #include "Queue_impl/PrivateQueue.h" | |
| 16 | 18 |
| 17 //========================== | 19 //========================== |
| 18 //#define TURN_ON_DEBUG | 20 //#define TURN_ON_DEBUG |
| 19 | 21 |
| 20 //========================== | 22 //========================== |
| 145 //=========== Global Vars ============= | 147 //=========== Global Vars ============= |
| 146 pthread_mutex_t tupleIterLock; | 148 pthread_mutex_t tupleIterLock; |
| 147 pthread_cond_t tupleIterCond; | 149 pthread_cond_t tupleIterCond; |
| 148 int tupleIter; | 150 int tupleIter; |
| 149 | 151 |
| 150 pthread_mutex_t producerAccessMutex; | 152 pthread_mutex_t queueAccessLock; |
| 151 pthread_mutex_t productionReadyLock; | 153 PrivQueueStruc *commQ; |
| 152 pthread_cond_t productionReadyCond; | 154 |
| 153 int currProductionNum; | 155 int currProductionNum; |
| 154 int producerMessage; | 156 int producerMessage; |
| 155 | |
| 156 pthread_mutex_t consumerReceivedAckLock; | |
| 157 pthread_cond_t consumerReceivedAckCond; | |
| 158 int currConsumerReceivedACKNum; | |
| 159 | 157 |
| 160 //======= | 158 //======= |
| 161 void* | 159 void* |
| 162 producer_birthFn( void* _params ); | 160 producer_birthFn( void* _params ); |
| 163 void* | 161 void* |
