PERFORCE change 118893 for review

Roman Divacky rdivacky at FreeBSD.org
Fri Apr 27 20:28:20 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=118893

Change 118893 by rdivacky at rdivacky_witten on 2007/04/27 20:27:27

	Some comments to clear the situation.

Affected files ...

.. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/linux/linux_futex.c#3 edit

Differences ...

==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/linux/linux_futex.c#3 (text+ko) ====

@@ -401,9 +401,12 @@
 	TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
 	FUTEX_UNLOCK;
 
+	/* if we got woken up in futex_wake */
 	if ((ret == 0) && (wp->wp_new_futex != NULL)) {
+		/* suspend us on the new futex */
 		ret = futex_sleep(wp->wp_new_futex, td, timeout);
-		futex_put(wp->wp_new_futex);	/* futex_get called in wakeup */
+		/* and release the old one */
+		futex_put(wp->wp_new_futex);
 	}
 
 	free(wp, M_LINUX);


More information about the p4-projects mailing list