| 333 | } |
| 334 | |
| 335 | U32 KSystem::kill(S32 pid, U32 signal) { |
| 336 | KProcessPtr process; |
| 337 | { |
| 338 | BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(processesCond); |
| 339 | |
| 340 | if (pid>0) { |
| 341 | process = KSystem::processes[pid]; |
| 342 | } else if (pid == 0 || pid == -1) { |
| 343 | kpanic_fmt("kill with pid = %d not implemented", pid); |
| 344 | } else { |
| 345 | process = KSystem::processes[-pid]; |
| 346 | } |
| 347 | if (!process) { |
| 348 | return -K_ESRCH; |
| 349 | } |
| 350 | } |
| 351 | if (signal!=0) { |
| 352 | return process->signal(signal); |
| 353 | } |
| 354 | return 0; |
| 355 | } |
| 356 | |
| 357 | void KSystem::wakeThreadsWaitingOnProcessStateChanged() { |
| 358 | BOXEDWINE_CONDITION_SIGNAL_ALL(processesCond); |
nothing calls this directly
no test coverage detected