[haiku-commits] r42012 - haiku/branches/developer/bonefish/signals/src/system/kernel

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 7 Jun 2011 19:36:58 +0200 (CEST)

Author: bonefish
Date: 2011-06-07 19:36:58 +0200 (Tue, 07 Jun 2011)
New Revision: 42012
Changeset: https://dev.haiku-os.org/changeset/42012

Modified:
   haiku/branches/developer/bonefish/signals/src/system/kernel/thread.cpp
Log:
* common_snooze_etc(): Fixed comment.
* _user_snooze_etc(): The wrong size was passed to the user_memcpy() copying
  the remaining time value back to userland.


Modified: haiku/branches/developer/bonefish/signals/src/system/kernel/thread.cpp
===================================================================
--- haiku/branches/developer/bonefish/signals/src/system/kernel/thread.cpp      
2011-06-07 16:52:13 UTC (rev 42011)
+++ haiku/branches/developer/bonefish/signals/src/system/kernel/thread.cpp      
2011-06-07 17:36:58 UTC (rev 42012)
@@ -1331,8 +1331,9 @@
                        flags |= B_TIMEOUT_REAL_TIME_BASE;
                case CLOCK_MONOTONIC:
                {
-                       // store the start time, for the case that we get 
interrupt and
-                       // need to return the remaining
+                       // Store the start time, for the case that we get 
interrupted and
+                       // need to return the remaining time. For absolute 
timeouts we can
+                       // still get he time later, if needed.
                        bigtime_t startTime
                                = _remainingTime != NULL && (flags & 
B_RELATIVE_TIMEOUT) != 0
                                        ? system_time() : 0;
@@ -3474,7 +3475,7 @@
                if (userRemainingTime != NULL
                        && (!IS_USER_ADDRESS(userRemainingTime)
                                || user_memcpy(userRemainingTime, 
&remainingTime,
-                                       sizeof(userRemainingTime)) != B_OK)) {
+                                       sizeof(remainingTime)) != B_OK)) {
                        return B_BAD_ADDRESS;
                }
 


Other related posts:

  • » [haiku-commits] r42012 - haiku/branches/developer/bonefish/signals/src/system/kernel - ingo_weinhold