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

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 7 Jun 2011 01:26:38 +0200 (CEST)

Author: bonefish
Date: 2011-06-07 01:26:37 +0200 (Tue, 07 Jun 2011)
New Revision: 41997
Changeset: https://dev.haiku-os.org/changeset/41997

Modified:
   haiku/branches/developer/bonefish/signals/src/system/kernel/UserTimer.cpp
Log:
_user_create_timer(): Only try to get the thread creation attributes when the
notification method is SIGEV_THREAD.


Modified: 
haiku/branches/developer/bonefish/signals/src/system/kernel/UserTimer.cpp
===================================================================
--- haiku/branches/developer/bonefish/signals/src/system/kernel/UserTimer.cpp   
2011-06-06 23:07:55 UTC (rev 41996)
+++ haiku/branches/developer/bonefish/signals/src/system/kernel/UserTimer.cpp   
2011-06-06 23:26:37 UTC (rev 41997)
@@ -1597,10 +1597,12 @@
        // copy thread creation attributes from userland, if specified
        char nameBuffer[B_OS_NAME_LENGTH];
        ThreadCreationAttributes threadAttributes;
-       status_t error = threadAttributes.InitFromUserAttributes(
-               userThreadAttributes, nameBuffer);
-       if (error != B_OK)
-               return error;
+       if (event.sigev_notify == SIGEV_THREAD) {
+               status_t error = threadAttributes.InitFromUserAttributes(
+                       userThreadAttributes, nameBuffer);
+               if (error != B_OK)
+                       return error;
+       }
 
        // get team and thread
        Team* team = thread_get_current_thread()->team;


Other related posts:

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