Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/proc.h
Show First 20 Lines • Show All 694 Lines • ▼ Show 20 Lines | #define p_startcopy p_endzero | ||||
struct sysentvec *p_sysent; /* (b) Syscall dispatch info. */ | struct sysentvec *p_sysent; /* (b) Syscall dispatch info. */ | ||||
struct pargs *p_args; /* (c) Process arguments. */ | struct pargs *p_args; /* (c) Process arguments. */ | ||||
rlim_t p_cpulimit; /* (c) Current CPU limit in seconds. */ | rlim_t p_cpulimit; /* (c) Current CPU limit in seconds. */ | ||||
signed char p_nice; /* (c) Process "nice" value. */ | signed char p_nice; /* (c) Process "nice" value. */ | ||||
int p_fibnum; /* in this routing domain XXX MRT */ | int p_fibnum; /* in this routing domain XXX MRT */ | ||||
pid_t p_reapsubtree; /* (e) Pid of the direct child of the | pid_t p_reapsubtree; /* (e) Pid of the direct child of the | ||||
reaper which spawned | reaper which spawned | ||||
our subtree. */ | our subtree. */ | ||||
uint16_t p_elf_machine; /* (x) ELF machine type */ | uint16_t p_elf_machine; /* (x) ELF machine type */ | ||||
markj: I think `p_elf_machine` is redundant now, isn't it always equal to `p_elf_brandinfo->machine`? | |||||
Done Inline Actionsyes, it is equal, this will be the next dchagin: yes, it is equal, this will be the next | |||||
uint64_t p_elf_flags; /* (x) ELF flags */ | uint64_t p_elf_flags; /* (x) ELF flags */ | ||||
void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for | |||||
non ELF binaries. */ | |||||
Not Done Inline ActionsYou do not clear it on exec, so the note about NULL for non-elf binaries is not true. I am not sure if this needs fixing. Also note the spelling, it is ELF, not Elf. kib: You do not clear it on exec, so the note about NULL for non-elf binaries is not true. I am not… | |||||
/* End area that is copied on creation. */ | /* End area that is copied on creation. */ | ||||
#define p_endcopy p_xexit | #define p_endcopy p_xexit | ||||
u_int p_xexit; /* (c) Exit code. */ | u_int p_xexit; /* (c) Exit code. */ | ||||
u_int p_xsig; /* (c) Stop/kill sig. */ | u_int p_xsig; /* (c) Stop/kill sig. */ | ||||
struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ | struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ | ||||
struct knlist *p_klist; /* (c) Knotes attached to this proc. */ | struct knlist *p_klist; /* (c) Knotes attached to this proc. */ | ||||
int p_numthreads; /* (c) Number of threads. */ | int p_numthreads; /* (c) Number of threads. */ | ||||
Show All 16 Lines | #define p_endcopy p_xexit | ||||
* debugger as a result of attaching to it. Need to keep | * debugger as a result of attaching to it. Need to keep | ||||
* track of them for parent to be able to collect the exit | * track of them for parent to be able to collect the exit | ||||
* status of what used to be children. | * status of what used to be children. | ||||
*/ | */ | ||||
LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ | LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ | ||||
LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ | LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ | ||||
TAILQ_HEAD(, kq_timer_cb_data) p_kqtim_stop; /* (c) */ | TAILQ_HEAD(, kq_timer_cb_data) p_kqtim_stop; /* (c) */ | ||||
}; | }; | ||||
Not Done Inline ActionsThis should be named like p_elf_brand_info. kib: This should be named like p_elf_brand_info.
Also, I believe it should be in the section that is… | |||||
#define p_session p_pgrp->pg_session | #define p_session p_pgrp->pg_session | ||||
#define p_pgid p_pgrp->pg_id | #define p_pgid p_pgrp->pg_id | ||||
#define NOCPU (-1) /* For when we aren't on a CPU. */ | #define NOCPU (-1) /* For when we aren't on a CPU. */ | ||||
#define NOCPU_OLD (255) | #define NOCPU_OLD (255) | ||||
#define MAXCPU_OLD (254) | #define MAXCPU_OLD (254) | ||||
▲ Show 20 Lines • Show All 552 Lines • Show Last 20 Lines |
I think p_elf_machine is redundant now, isn't it always equal to p_elf_brandinfo->machine? Maybe not worth addressing in this review.