Module Name:    src
Committed By:   pooka
Date:           Thu Oct 15 16:47:23 UTC 2009

Modified Files:
        src/tests/syscall: t_cmsg.c

Log Message:
fix test for new-world rump lwp usage


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/syscall/t_cmsg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/syscall/t_cmsg.c
diff -u src/tests/syscall/t_cmsg.c:1.8 src/tests/syscall/t_cmsg.c:1.9
--- src/tests/syscall/t_cmsg.c:1.8	Wed Oct 14 18:22:50 2009
+++ src/tests/syscall/t_cmsg.c	Thu Oct 15 16:47:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_cmsg.c,v 1.8 2009/10/14 18:22:50 pooka Exp $	*/
+/*	$NetBSD: t_cmsg.c,v 1.9 2009/10/15 16:47:23 pooka Exp $	*/
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -104,6 +104,9 @@
 	if (rump_sys_mount(MOUNT_TMPFS, "/", 0, &args, sizeof(args)) == -1)
 		atf_tc_fail_errno("mount tmpfs");
 
+	/* store our current lwp/proc */
+	l1 = rump_pub_newproc_switch();
+
 	/* create unix socket and bind it to a path */
 	memset(&sun, 0, sizeof(sun));
 	sun.sun_family = AF_LOCAL;
@@ -117,9 +120,6 @@
 	if (rump_sys_listen(s1, 1) == -1)
 		atf_tc_fail_errno("socket 1 listen");
 
-	/* store our current lwp/proc */
-	l1 = rump_pub_get_curlwp();
-
 	/* create new process */
 	l2 = rump_pub_newproc_switch();
 
@@ -166,7 +166,7 @@
 		atf_tc_fail_errno("sendmsg failed");
 
 	/* switch back to original proc */
-	rump_set_curlwp(l1);
+	rump_pub_lwp_switch(l1);
 
 	/* accept connection and read fd */
 	sl = sizeof(sun);

Reply via email to