Lines Matching refs:this
68 struct nce_status_t *this; in nce_init() local
70 this = calloc(1, sizeof(struct nce_status_t)); in nce_init()
72 if (this == NULL) { /* LCOV_EXCL_BR_LINE */ in nce_init()
75 this->cpu_halted = true; in nce_init()
76 this->terminate = false; in nce_init()
78 NSI_SAFE_CALL(sem_init(&this->sem_sw, 0, 0)); in nce_init()
79 NSI_SAFE_CALL(sem_init(&this->sem_hw, 0, 0)); in nce_init()
81 return (void *)this; in nce_init()
95 struct nce_status_t *this = (struct nce_status_t *)this_arg; in nce_terminate() local
104 if (this == NULL || this->cpu_halted) { in nce_terminate()
114 } else if (this->terminate == false) { in nce_terminate()
116 this->terminate = true; in nce_terminate()
117 this->cpu_halted = true; in nce_terminate()
119 NSI_SAFE_CALL(sem_post(&this->sem_hw)); in nce_terminate()
137 struct nce_status_t *this = (struct nce_status_t *)this_arg; in sw_wrapper() local
140 NSI_SAFE_CALL(nce_sem_rewait(&this->sem_sw)); in sw_wrapper()
149 this->start_routine(); in sw_wrapper()
164 struct nce_status_t *this = (struct nce_status_t *)this_arg; in nce_boot_cpu() local
166 this->start_routine = start_routine; in nce_boot_cpu()
187 struct nce_status_t *this = (struct nce_status_t *)this_arg; in nce_halt_cpu() local
189 if (this->cpu_halted == true) { in nce_halt_cpu()
193 this->cpu_halted = true; in nce_halt_cpu()
195 NSI_SAFE_CALL(sem_post(&this->sem_hw)); in nce_halt_cpu()
196 NSI_SAFE_CALL(nce_sem_rewait(&this->sem_sw)); in nce_halt_cpu()
211 struct nce_status_t *this = (struct nce_status_t *)this_arg; in nce_wake_cpu() local
213 if (this->cpu_halted == false) { in nce_wake_cpu()
218 this->cpu_halted = false; in nce_wake_cpu()
220 NSI_SAFE_CALL(sem_post(&this->sem_sw)); in nce_wake_cpu()
221 NSI_SAFE_CALL(nce_sem_rewait(&this->sem_hw)); in nce_wake_cpu()
229 if (this->terminate) { in nce_wake_cpu()
240 struct nce_status_t *this = (struct nce_status_t *)this_arg; in nce_is_cpu_running() local
242 if (this != NULL) { in nce_is_cpu_running()
243 return !this->cpu_halted; in nce_is_cpu_running()