summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/portdat.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-08-04 06:47:56 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-08-04 06:47:56 +0200
commite3d959128398dd7b770d58f1ea8e97b2405e51d8 (patch)
tree35761b65d8bc9643427398006b74ecefa3353598 /sys/src/cmd/cwfs/portdat.h
parent24349c52b4fc930d183cf4ec4d7f4b6275e7cb0d (diff)
cwfs: faster queue implementation using semacquire()
Diffstat (limited to 'sys/src/cmd/cwfs/portdat.h')
-rw-r--r--sys/src/cmd/cwfs/portdat.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/src/cmd/cwfs/portdat.h b/sys/src/cmd/cwfs/portdat.h
index d2af352e0..d360ed841 100644
--- a/sys/src/cmd/cwfs/portdat.h
+++ b/sys/src/cmd/cwfs/portdat.h
@@ -160,15 +160,17 @@ enum {
*/
struct Queue
{
- QLock; /* to manipulate values */
- Rendez empty;
- Rendez full;
-
char* name; /* for debugging */
int size; /* size of queue */
- int loc; /* circular pointer */
- int count; /* how many in queue */
+
+ long count; /* how many in queue (semaphore) */
+ long avail; /* how many available to send (semaphore) */
+
+ Lock rl, wl; /* circular pointers */
+ void **rp;
+ void **wp;
+
void* args[1]; /* list of saved pointers, [->size] */
};