| 87 | void ff_restore_curthread(void *old_curthread); |
| 88 | |
| 89 | void * |
| 90 | ff_adapt_user_thread_add(void *parent) |
| 91 | { |
| 92 | struct thread *parent_td = (struct thread *)parent; |
| 93 | |
| 94 | /* new application */ |
| 95 | if (parent_td == NULL) { |
| 96 | parent_td = &thread0; |
| 97 | } |
| 98 | |
| 99 | struct thread *td = malloc(sizeof(struct proc), M_TEMP, M_ZERO); |
| 100 | if (td == NULL) { |
| 101 | goto fail; |
| 102 | } |
| 103 | |
| 104 | if (ff_adapt_user_proc_add(parent_td, td) < 0) { |
| 105 | free(td, M_TEMP); |
| 106 | goto fail; |
| 107 | } |
| 108 | |
| 109 | return (void*)td; |
| 110 | |
| 111 | fail: |
| 112 | return NULL; |
| 113 | } |
| 114 | |
| 115 | void |
| 116 | ff_adapt_user_thread_exit(void *td) |
no test coverage detected