Permalink
Browse files

fix thread scheduler queue alignment bug that was breaking (some) C a…

…pps with a cmpxchg16b GPF. pointer arithmetic: not even once.
  • Loading branch information...
1 parent e3afe51 commit 12fe63e5c1f8d9fad42031d874ce48400aa41094 @wolfwood wolfwood committed Jan 28, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 libos/libdeepmajik/threadscheduler.d
@@ -473,7 +473,7 @@ align(1) struct XombThread {
//XXX: this are dumb. should go away when 16 byte struct alignment works properly
void initialize(){
- queuePtr = (cast(ulong)(&schedQueueStorage) % 16) != 0 ? (&schedQueueStorage + 8) : (&schedQueueStorage);
+ queuePtr = (cast(ulong)(&schedQueueStorage) % 16) != 0 ? cast(Queue*)(cast(ulong)(&schedQueueStorage) + 8) : (&schedQueueStorage);
}
private:

0 comments on commit 12fe63e

Please sign in to comment.