Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. if (!success){
  2. // up
  3. sema_up(exec_sema);
  4. thread_exit();
  5. }else{
  6. // add up
  7. struct child_thread_struct *new_child =malloc(sizeof(struct child_thread_struct));
  8. new_child->t=thread_current();
  9. list_push_back(&args->parent_thread->childern,&new_child->elem);
  10. sema_up(exec_sema);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement