PERFORCE change 114977 for review

Alexander Leidinger netchild at FreeBSD.org
Sat Feb 24 16:39:57 UTC 2007


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

Change 114977 by netchild at netchild_magellan on 2007/02/24 16:39:29

	Whitespace commit: Fix grammar, spelling and punctuation.
	Submitted by:	"Scot Hetzel" <swhetzel at gmail.com>

Affected files ...

.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#20 edit
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#41 edit
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#38 edit
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#14 edit
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_futex.c#13 edit
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#59 edit
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_uid16.c#3 edit
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_util.c#2 edit
.. //depot/projects/linuxolator/src/sys/i386/linux/imgact_linux.c#2 edit
.. //depot/projects/linuxolator/src/sys/i386/linux/linux.h#16 edit
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#32 edit

Differences ...

==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#20 (text+ko) ====

@@ -785,7 +785,7 @@
 
 /* 
  * macros which does the same thing as those in linux include/asm-um/ldt-i386.h 
- * these convert linux user-space descriptor to machine one
+ * these convert linux user space descriptor to machine one
  */
 #define LDT_entry_a(info) \
         ((((info)->base_addr & LINUX_LOWERWORD) << 16) | ((info)->limit & LINUX_LOWERWORD))

==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#41 (text+ko) ====

@@ -483,7 +483,9 @@
 
 	td2 = FIRST_THREAD_IN_PROC(p2);
 
-	/* make it run */
+	/*
+	 * Make this runnable after we are finished with it.
+	 */
 	mtx_lock_spin(&sched_lock);
 	TD_SET_CAN_RUN(td2);
 	sched_add(td2, SRQ_BORING);
@@ -581,7 +583,7 @@
 	 * kernel threads. Unfortunately despite the existence of the
 	 * CLONE_THREAD flag, version of linuxthreads package used in
 	 * most popular distros as of beginning of 2005 doesn't make
-	 * any use of it. Therefore, this detection relay fully on
+	 * any use of it. Therefore, this detection relies on
 	 * empirical observation that linuxthreads sets certain
 	 * combination of flags, so that we can make more or less
 	 * precise detection and notify the FreeBSD kernel that several
@@ -869,7 +871,7 @@
 		 * Our mmap with MAP_STACK takes addr as the maximum
 		 * downsize limit on BOS, and as len the max size of
 		 * the region.  It them maps the top SGROWSIZ bytes,
-		 * and autgrows the region down, up to the limit
+		 * and auto grows the region down, up to the limit
 		 * in addr.
 		 *
 		 * If we don't use the MAP_STACK option, the effect
@@ -1040,7 +1042,7 @@
 }
 
 /*
- * Linux has two extra args, restart and oldmask.  We dont use these,
+ * Linux has two extra args, restart and oldmask.  We don't use these,
  * but it seems that "restart" is actually a context pointer that
  * enables the signal to happen with a different register set.
  */

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#38 (text+ko) ====

@@ -212,7 +212,7 @@
 		error = linux_sys_futex(FIRST_THREAD_IN_PROC(p), &cup);
 		/*
 		 * this cannot happen at the moment and if this happens it
-		 * probably mean there is a userspace bug
+		 * probably means there is a user space bug
 		 */
 		if (error)
 			printf(LMSG("futex stuff in proc_exit failed.\n"));

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#14 (text+ko) ====

@@ -195,7 +195,7 @@
 	char *fullpath = "unknown";
 	char *freepath = NULL;
 
-	/* dont do anything if the pathname is absolute */
+	/* don't do anything if the pathname is absolute */
 	if (*filename == '/') {
 	   	*newpath= filename;
 	   	return (0);

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_futex.c#13 (text+ko) ====

@@ -208,9 +208,9 @@
 		FUTEX_SYSTEM_LOCK;
 
 		/*
-		 * XXX: Linux is able cope with different addresses
+		 * XXX: Linux is able to cope with different addresses
 		 * corresponding to the same mapped memory in the sleeping
-		 * and the waker process.
+		 * and waker process(es).
 		 */
 #ifdef DEBUG
 		if (ldebug(sys_futex))
@@ -283,7 +283,7 @@
 		op_ret = futex_atomic_op(td, args->val3, args->uaddr2);
 		if (op_ret < 0) {
 
-			/* XXX: we dont handle the EFAULT yet */
+			/* XXX: we don't handle the EFAULT yet */
 			if (op_ret != -EFAULT) {
 				futex_put(f);
 				futex_put(f2);

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#59 (text+ko) ====

@@ -836,7 +836,7 @@
 		    args->pid, (void *)args->status, args->options);
 #endif
 	/*
-	 * this is necessary because the test in kern_wait doesnt work
+	 * this is necessary because the test in kern_wait doesn't work
 	 * because we mess with the options here
 	 */
 	if (args->options & ~(WUNTRACED | WNOHANG | WCONTINUED | __WCLONE))
@@ -1428,10 +1428,9 @@
 
 /*
  * The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify
- * td->td_retval[1] when COMPAT_43 is defined. This
- * globbers registers that are assumed to be preserved. The following
- * lightweight syscalls fixes this. See also linux_getgid16() and
- * linux_getuid16() in linux_uid16.c.
+ * td->td_retval[1] when COMPAT_43 is defined. This clobbers registers that
+ * are assumed to be preserved. The following lightweight syscalls fixes
+ * this. See also linux_getgid16() and linux_getuid16() in linux_uid16.c
  *
  * linux_getpid() - MP SAFE
  * linux_getgid() - MP SAFE

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_uid16.c#3 (text+ko) ====

@@ -199,10 +199,9 @@
 
 /*
  * The FreeBSD native getgid(2) and getuid(2) also modify td->td_retval[1]
- * when COMPAT_43 is defined. This globbers registers that
- * are assumed to be preserved. The following lightweight syscalls fixes
- * this. See also linux_getpid(2), linux_getgid(2) and linux_getuid(2) in
- * linux_misc.c
+ * when COMPAT_43 is defined. This clobbers registers that are assumed to
+ * be preserved. The following lightweight syscalls fixes this. See also
+ * linux_getpid(2), linux_getgid(2) and linux_getuid(2) in linux_misc.c
  *
  * linux_getgid16() - MP SAFE
  * linux_getuid16() - MP SAFE

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_util.c#2 (text+ko) ====

@@ -58,12 +58,11 @@
 const char      linux_emul_path[] = "/compat/linux";
 
 /*
- * Search an alternate path before passing pathname arguments on
- * to system calls. Useful for keeping a separate 'emulation tree'.
+ * Search an alternate path before passing pathname arguments on to
+ * system calls. Useful for keeping a separate 'emulation tree'.
  *
- * If cflag is set, we check if an attempt can be made to create
- * the named file, i.e. we check if the directory it should
- * be in exists.
+ * If cflag is set, we check if an attempt can be made to create the
+ * named file, i.e. we check if the directory it should be in exists.
  */
 int
 linux_emul_convpath(td, path, pathseg, pbuf, cflag)

==== //depot/projects/linuxolator/src/sys/i386/linux/imgact_linux.c#2 (text+ko) ====

@@ -124,7 +124,7 @@
 
     /*
      * Check if file_offset page aligned,.
-     * Currently we cannot handle misalinged file offsets,
+     * Currently we cannot handle misaligned file offsets,
      * and so we read in the entire image (what a waste).
      */
     if (file_offset & PAGE_MASK) {

==== //depot/projects/linuxolator/src/sys/i386/linux/linux.h#16 (text+ko) ====

@@ -745,7 +745,7 @@
 
 /* 
  * macros which does the same thing as those in linux include/asm-um/ldt-i386.h 
- * these convert linux user-space descriptor to machine one
+ * these convert linux user space descriptor to machine one
  */
 #define LDT_entry_a(info) \
         ((((info)->base_addr & LINUX_LOWERWORD) << 16) | ((info)->limit & LINUX_LOWERWORD))

==== //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#32 (text+ko) ====

@@ -125,7 +125,7 @@
 	if (error == 0)
 		error = kern_execve(td, &eargs, NULL);
 	if (error == 0)
-	   	/* linux process can exec fbsd one, dont attempt
+	   	/* linux process can exec fbsd one, don't attempt
 		 * to create emuldata for such process using
 		 * linux_proc_init, this leads to a panic on KASSERT
 		 * because such process has p->p_emuldata == NULL
@@ -401,8 +401,8 @@
 	/* 
 	 * XXX: in linux sharing of fs info (chroot/cwd/umask)
 	 * and open files is independant. in fbsd its in one
-	 * structure but in reality it doesnt make any problems
-	 * because both this flags are set at once usually.
+	 * structure but in reality it doesn't cause any problems
+	 * because both of these flags are usually set together.
 	 */
 	if (!(args->flags & (CLONE_FILES | CLONE_FS)))
 		ff |= RFFDG;
@@ -412,7 +412,7 @@
 	 * kernel threads. Unfortunately despite the existence of the
 	 * CLONE_THREAD flag, version of linuxthreads package used in
 	 * most popular distros as of beginning of 2005 doesn't make
-	 * any use of it. Therefore, this detection relay fully on
+	 * any use of it. Therefore, this detection relies on
 	 * empirical observation that linuxthreads sets certain
 	 * combination of flags, so that we can make more or less
 	 * precise detection and notify the FreeBSD kernel that several
@@ -709,7 +709,7 @@
 		 * Our mmap with MAP_STACK takes addr as the maximum
 		 * downsize limit on BOS, and as len the max size of
 		 * the region.  It them maps the top SGROWSIZ bytes,
-		 * and autgrows the region down, up to the limit
+		 * and auto grows the region down, up to the limit
 		 * in addr.
 		 *
 		 * If we don't use the MAP_STACK option, the effect
@@ -952,7 +952,7 @@
 }
 
 /*
- * Linux has two extra args, restart and oldmask.  We dont use these,
+ * Linux has two extra args, restart and oldmask.  We don't use these,
  * but it seems that "restart" is actually a context pointer that
  * enables the signal to happen with a different register set.
  */
@@ -1093,18 +1093,21 @@
 
 	idx = info.entry_number;
 	/* 
-	 * Semantics of linux version: every thread in the system has array
-	 * of 3 tls descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. This
-	 * syscall loads one of the selected tls decriptors with a value
-	 * and also loads GDT descriptors 6, 7 and 8 with the content of the per-thread 
-	 * descriptors.
+	 * Semantics of linux version: every thread in the system has array of
+	 * 3 tls descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. This
+	 * syscall loads one of the selected tls decriptors with a value and
+	 * also loads GDT descriptors 6, 7 and 8 with the content of the
+	 * per-thread descriptors.
+	 *
+	 * Semantics of fbsd version: I think we can ignore that linux has 3
+	 * per-thread descriptors and use just the 1st one. The tls_array[]
+	 * is used only in set/get-thread_area() syscalls and for loading the
+	 * GDT descriptors. In fbsd we use just one GDT descriptor for TLS so
+	 * we will load just one. 
 	 *
-	 * Semantics of fbsd version: I think we can ignore that linux has 3 per-thread
-	 * descriptors and use just the 1st one. The tls_array[] is used only in 
-	 * set/get-thread_area() syscalls and for loading the GDT descriptors. In fbsd 
-	 * we use just one GDT descriptor for TLS so we will load just one. 
-	 * XXX: this doesnt work when user-space process tries to use more then 1 TLS segment
-	 * comment in the linux sources says wine might do that.
+	 * XXX: this doesn't work when a user space process tries to use more
+	 * than 1 TLS segment. Comment in the linux sources says wine might do
+	 * this.
 	 */
 
 	/* 
@@ -1117,8 +1120,9 @@
 
 	/* 
 	 * we have to copy out the GDT entry we use
-	 * FreeBSD uses GDT entry #3 for storing %gs so load that 
-	 * XXX: what if userspace program doesnt check this value and tries
+	 * FreeBSD uses GDT entry #3 for storing %gs so load that
+	 *
+	 * XXX: what if a user space program doesn't check this value and tries
 	 * to use 6, 7 or 8? 
 	 */
 	idx = info.entry_number = 3;


More information about the p4-projects mailing list