thr_create.c (17706) | thr_create.c (22315) |
---|---|
1/* 2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 73 unchanged lines hidden (view full) --- 82 /* Initialise the thread structure: */ 83 memset(new_thread, 0, sizeof(struct pthread)); 84 new_thread->slice_usec = -1; 85 new_thread->sig_saved = 0; 86 new_thread->stack = stack; 87 new_thread->start_routine = start_routine; 88 new_thread->arg = arg; 89 if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) { | 1/* 2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 73 unchanged lines hidden (view full) --- 82 /* Initialise the thread structure: */ 83 memset(new_thread, 0, sizeof(struct pthread)); 84 new_thread->slice_usec = -1; 85 new_thread->sig_saved = 0; 86 new_thread->stack = stack; 87 new_thread->start_routine = start_routine; 88 new_thread->arg = arg; 89 if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) { |
90 new_thread->state = PS_SUSPENDED; | 90 PTHREAD_NEW_STATE(new_thread,PS_SUSPENDED); |
91 } else { | 91 } else { |
92 new_thread->state = PS_RUNNING; | 92 PTHREAD_NEW_STATE(new_thread,PS_RUNNING); |
93 } 94 95 /* Initialise the thread for signals: */ 96 new_thread->sigmask = _thread_run->sigmask; 97 98 /* 99 * Enter a loop to initialise the signal handler 100 * array: --- 102 unchanged lines hidden (view full) --- 203 204 /* Check if a parent thread was specified: */ 205 if (parent != NULL) { 206 /* 207 * A parent thread was specified, so this is 208 * a signal handler thread which must now 209 * wait for the signal handler to complete: 210 */ | 93 } 94 95 /* Initialise the thread for signals: */ 96 new_thread->sigmask = _thread_run->sigmask; 97 98 /* 99 * Enter a loop to initialise the signal handler 100 * array: --- 102 unchanged lines hidden (view full) --- 203 204 /* Check if a parent thread was specified: */ 205 if (parent != NULL) { 206 /* 207 * A parent thread was specified, so this is 208 * a signal handler thread which must now 209 * wait for the signal handler to complete: 210 */ |
211 parent->state = PS_SIGTHREAD; | 211 PTHREAD_NEW_STATE(parent,PS_SIGTHREAD); |
212 } else { 213 /* Schedule the new user thread: */ 214 _thread_kern_sched(NULL); 215 } 216 } 217 } 218 219 /* Unblock signals: */ --- 61 unchanged lines hidden --- | 212 } else { 213 /* Schedule the new user thread: */ 214 _thread_kern_sched(NULL); 215 } 216 } 217 } 218 219 /* Unblock signals: */ --- 61 unchanged lines hidden --- |