X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fworkqueue.c;h=cfdf4280a36a9fe044414dbdc9d9d13fb318d891;hb=13cfd41138fbb925b9a9e239ecd58d1a768ac5aa;hp=38bf932c179de81a6fc074cfe8b07c1ed3290747;hpb=0e361ff8d9472885f770a370c0d477c229041572;p=tpg%2Facess2.git diff --git a/Kernel/workqueue.c b/Kernel/workqueue.c index 38bf932c..cfdf4280 100644 --- a/Kernel/workqueue.c +++ b/Kernel/workqueue.c @@ -27,7 +27,7 @@ void *Workqueue_GetWork(tWorkqueue *Queue) 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); @@ -58,7 +58,7 @@ void Workqueue_AddWork(tWorkqueue *Queue, void *Ptr) 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;