git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleaning up for release
[tpg/acess2.git]
/
Kernel
/
workqueue.c
diff --git
a/Kernel/workqueue.c
b/Kernel/workqueue.c
index
38bf932
..
b1a6385
100644
(file)
--- a/
Kernel/workqueue.c
+++ b/
Kernel/workqueue.c
@@
-27,7
+27,7
@@
void *Workqueue_GetWork(tWorkqueue *Queue)
if(Queue->Head)
{
void *ret = Queue->Head;
if(Queue->Head)
{
void *ret = Queue->Head;
- Queue->Head = *(
void**)( (char*)ret + Queue->NextOffset
);
+ Queue->Head = *(
(void**)ret + Queue->NextOffset/sizeof(void*)
);
if(Queue->Tail == ret)
Queue->Tail = NULL;
SHORTREL(&Queue->Protector);
if(Queue->Tail == ret)
Queue->Tail = NULL;
SHORTREL(&Queue->Protector);
@@
-58,17
+58,15
@@
void Workqueue_AddWork(tWorkqueue *Queue, void *Ptr)
SHORTLOCK(&Queue->Protector);
if( Queue->Tail )
SHORTLOCK(&Queue->Protector);
if( Queue->Tail )
- *(
void**)( (char*)Queue->Tail + Queue->NextOffset
) = Ptr;
+ *(
(void**)Queue->Tail + Queue->NextOffset/sizeof(void*)
) = Ptr;
else
Queue->Head = Ptr;
Queue->Tail = Ptr;
if( Queue->Sleeper )
{
else
Queue->Head = Ptr;
Queue->Tail = Ptr;
if( Queue->Sleeper )
{
- SHORTLOCK( &glThreadListLock );
if( Queue->Sleeper->Status != THREAD_STAT_ACTIVE )
Threads_AddActive(Queue->Sleeper);
if( Queue->Sleeper->Status != THREAD_STAT_ACTIVE )
Threads_AddActive(Queue->Sleeper);
- SHORTREL( &glThreadListLock );
Queue->Sleeper = NULL;
}
SHORTREL(&Queue->Protector);
Queue->Sleeper = NULL;
}
SHORTREL(&Queue->Protector);
UCC
git Repository :: git.ucc.asn.au