PERFORCE change 101086 for review
Roman Divacky
rdivacky at FreeBSD.org
Sun Jul 9 09:35:56 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101086
Change 101086 by rdivacky at rdivacky_witten on 2006/07/09 09:35:12
Wakeup all blocked threads waiting for a futex in proc_exit() hook.
Affected files ...
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#12 edit
Differences ...
==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#12 (text+ko) ====
@@ -56,6 +56,7 @@
#include <i386/linux/linux.h>
#include <i386/linux/linux_proto.h>
+#include <compat/linux/linux_futex.h>
#include <compat/linux/linux_ipc.h>
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_util.h>
@@ -1164,6 +1165,7 @@
}
#endif
if (em->clear_tid != NULL) {
+ struct linux_sys_futex_args cup;
int null = 0;
error = copyout(&null, em->clear_tid, sizeof(null));
@@ -1172,7 +1174,16 @@
return (error);
}
- /* TODO: futexes stuff */
+ /* futexes stuff */
+ cup.uaddr = em->clear_tid;
+ cup.op = LINUX_FUTEX_WAKE;
+ cup.val = 0x7fffffff; /* Awake everyone */
+ cup.timeout = NULL;
+ cup.uaddr2 = NULL;
+ cup.val3 = 0;
+ error = linux_sys_futex(td, &cup);
+ if (error)
+ printf("futex stuff in proc_exit failed.\n");
}
EMUL_RUNLOCK(&emul_lock);
More information about the p4-projects
mailing list