diff options
author | Benny Baumann <BenBE@geshi.org> | 2023-11-23 12:22:02 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-12-26 15:14:19 +0100 |
commit | 6aa9ef2726e42c4ae062b55be4d5cc015767d997 (patch) | |
tree | d5bd033946b404fa99b70b0b1c560725cef302bf /netbsd | |
parent | a98fc47ffe67e88b1a83f94382795b8787a9bfe8 (diff) |
Fix code style
Diffstat (limited to 'netbsd')
-rw-r--r-- | netbsd/NetBSDProcessTable.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/netbsd/NetBSDProcessTable.c b/netbsd/NetBSDProcessTable.c index 6fa5bfea..f09a3a4b 100644 --- a/netbsd/NetBSDProcessTable.c +++ b/netbsd/NetBSDProcessTable.c @@ -228,30 +228,32 @@ static void NetBSDProcessTable_scanProcs(NetBSDProcessTable* this) { /* TODO: According to the link below, SDYING should be a regarded state */ /* Taken from: https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/proc.h */ switch (kproc->p_realstat) { - case SIDL: proc->state = IDLE; break; - case SACTIVE: - // We only consider the first LWP with a one of the below states. - for (int j = 0; j < nlwps; j++) { - if (klwps) { - switch (klwps[j].l_stat) { - case LSONPROC: proc->state = RUNNING; break; - case LSRUN: proc->state = RUNNABLE; break; - case LSSLEEP: proc->state = SLEEPING; break; - case LSSTOP: proc->state = STOPPED; break; - default: proc->state = UNKNOWN; - } - if (proc->state != UNKNOWN) + case SIDL: proc->state = IDLE; break; + case SACTIVE: + // We only consider the first LWP with a one of the below states. + for (int j = 0; j < nlwps; j++) { + if (klwps) { + switch (klwps[j].l_stat) { + case LSONPROC: proc->state = RUNNING; break; + case LSRUN: proc->state = RUNNABLE; break; + case LSSLEEP: proc->state = SLEEPING; break; + case LSSTOP: proc->state = STOPPED; break; + default: proc->state = UNKNOWN; + } + + if (proc->state != UNKNOWN) { + break; + } + } else { + proc->state = UNKNOWN; break; - } else { - proc->state = UNKNOWN; - break; + } } - } - break; - case SSTOP: proc->state = STOPPED; break; - case SZOMB: proc->state = ZOMBIE; break; - case SDEAD: proc->state = DEFUNCT; break; - default: proc->state = UNKNOWN; + break; + case SSTOP: proc->state = STOPPED; break; + case SZOMB: proc->state = ZOMBIE; break; + case SDEAD: proc->state = DEFUNCT; break; + default: proc->state = UNKNOWN; } if (Process_isKernelThread(proc)) { |