Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Queue_impl
comparison PrivateQueue.c @ 17:1e93e5dbeda1
Build process fix
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 22 Jun 2011 16:55:10 +0200 |
| parents | 8fd77f9430f0 |
| children | 7c9e00ff1bf4 |
comparison
equal
deleted
inserted
replaced
| 10:613aa1716bf0 | 11:9e5d29d7b4f4 |
|---|---|
| 10 #include <string.h> | 10 #include <string.h> |
| 11 #include <errno.h> | 11 #include <errno.h> |
| 12 #include <stdlib.h> | 12 #include <stdlib.h> |
| 13 | 13 |
| 14 #include "PrivateQueue.h" | 14 #include "PrivateQueue.h" |
| 15 #include "../vmalloc.h" | |
| 15 | 16 |
| 16 | 17 |
| 17 | 18 |
| 18 //=========================================================================== | 19 //=========================================================================== |
| 19 | 20 |
| 21 * synchronizations | 22 * synchronizations |
| 22 */ | 23 */ |
| 23 | 24 |
| 24 PrivQueueStruc* makeVMSPrivQ() | 25 PrivQueueStruc* makeVMSPrivQ() |
| 25 { | 26 { |
| 26 PrivQueueStruc* retQ; | 27 PrivQueueStruc *retQ; |
| 27 retQ = (PrivQueueStruc *) VMS__malloc( sizeof( PrivQueueStruc ) ); | 28 retQ = VMS__malloc( sizeof( PrivQueueStruc ) ); |
| 28 | 29 retQ->startOfData = (void*)VMS__malloc( 1024 * sizeof(void *) ); |
| 29 retQ->startOfData = VMS__malloc( 1024 * sizeof(void *) ); | |
| 30 memset( retQ->startOfData, 0, 1024 ); | 30 memset( retQ->startOfData, 0, 1024 ); |
| 31 | 31 |
| 32 retQ->extractPos = &(retQ->startOfData[0]); //side by side == empty | 32 retQ->extractPos = &(retQ->startOfData[0]); //side by side == empty |
| 33 retQ->insertPos = &(retQ->startOfData[1]); // so start pos's have to be | 33 retQ->insertPos = &(retQ->startOfData[1]); // so start pos's have to be |
| 34 retQ->endOfData = &(retQ->startOfData[1023]); | 34 retQ->endOfData = &(retQ->startOfData[1023]); |
