Ticket #2068: rtems-PR#2068-pthreadcreate-4.10.diff

File rtems-PR#2068-pthreadcreate-4.10.diff, 837 bytes (added by strauman, on Jun 19, 2012 at 2:14:16 AM)

fix; patch for 4.10

Line 
1*** cpukit/posix/src/pthreadcreate.c.orig       2012-06-14 09:01:56.000000002 -0700
2--- cpukit/posix/src/pthreadcreate.c    2012-06-14 09:04:14.000000002 -0700
3***************
4*** 198,203 ****
5--- 198,205 ----
6     */
7    the_thread->do_post_task_switch_extension = true;
8 
9+   _Thread_Disable_dispatch();
10+
11    /*
12     *  POSIX threads are allocated and started in one operation.
13     */
14***************
15*** 217,222 ****
16--- 219,225 ----
17       *        thread while we are creating it.
18       */
19      if ( !status ) {
20+       _Thread_Enable_dispatch();
21        _POSIX_Threads_Free( the_thread );
22        _RTEMS_Unlock_allocator();
23        return EINVAL;
24***************
25*** 230,235 ****
26--- 233,240 ----
27      );
28    }
29 
30+   _Thread_Enable_dispatch();
31+
32    /*
33     *  Return the id and indicate we successfully created the thread
34     */