Date: Sat, 01 Feb 2003 22:46:14 +0000 From: Mark Murray <mark@grondar.org> To: julian@freebsd.org Cc: current@freebsd.org Subject: Style fixups for proc.h Message-ID: <200302012246.h11MkEaX028068@grimreaper.grondar.org>
next in thread | raw e-mail | index | archive | help
Hi OK to commit the style fixups below? (They just make sure that all function prototypes have all arguments named, and that all names are protected). int foo(int bar); becomes int foo(int _bar); M Index: proc.h =================================================================== RCS file: /home/ncvs/src/sys/sys/proc.h,v retrieving revision 1.291 diff -u -d -r1.291 proc.h @@ -860,101 +860,101 @@ extern int lastpid; -struct proc *pfind(pid_t); /* Find process by id. */ -struct pgrp *pgfind(pid_t); /* Find process group by id. */ -struct proc *zpfind(pid_t); /* Find zombie process by id. */ +struct proc *pfind(pid_t _pid); /* Find process by id. */ +struct pgrp *pgfind(pid_t _pid); /* Find process group by id. */ +struct proc *zpfind(pid_t _pid); /* Find zombie process by id. */ -void adjustrunqueue(struct thread *, int newpri); -void ast(struct trapframe *framep); +void adjustrunqueue(struct thread *_td, int _newpri); +void ast(struct trapframe *_framep); struct thread *choosethread(void); -int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); -int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); -int enterthispgrp(struct proc *p, struct pgrp *pgrp); -void faultin(struct proc *p); -void fixjobc(struct proc *p, struct pgrp *pgrp, int entering); -int fork1(struct thread *, int, int, struct proc **); -void fork_exit(void (*)(void *, struct trapframe *), void *, - struct trapframe *); -void fork_return(struct thread *, struct trapframe *); -int inferior(struct proc *p); -int leavepgrp(struct proc *p); +int cr_cansignal(struct ucred *_cred, struct proc *_p, int _signum); +int enterpgrp(struct proc *_p, pid_t _pgid, struct pgrp *pgrp, struct session *_sess); +int enterthispgrp(struct proc *_p, struct pgrp *_pgrp); +void faultin(struct proc *_p); +void fixjobc(struct proc *_p, struct pgrp *_pgrp, int _entering); +int fork1(struct thread *_td, int, int, struct proc **_p); +void fork_exit(void (*_func)(void *_ptr, struct trapframe *_tf), void *_ptr, + struct trapframe *_tf); +void fork_return(struct thread *_td, struct trapframe *_tf); +int inferior(struct proc *_p); +int leavepgrp(struct proc *_p); void mi_switch(void); -int p_candebug(struct thread *td, struct proc *p); -int p_cansee(struct thread *td, struct proc *p); -int p_cansched(struct thread *td, struct proc *p); -int p_cansignal(struct thread *td, struct proc *p, int signum); -struct pargs *pargs_alloc(int len); -void pargs_drop(struct pargs *pa); -void pargs_free(struct pargs *pa); -void pargs_hold(struct pargs *pa); +int p_candebug(struct thread *_td, struct proc *_p); +int p_cansee(struct thread *_td, struct proc *_p); +int p_cansched(struct thread *_td, struct proc *_p); +int p_cansignal(struct thread *_td, struct proc *_p, int _signum); +struct pargs *pargs_alloc(int _len); +void pargs_drop(struct pargs *_pa); +void pargs_free(struct pargs *_pa); +void pargs_hold(struct pargs *_pa); void procinit(void); void threadinit(void); -void proc_linkup(struct proc *p, struct ksegrp *kg, - struct kse *ke, struct thread *td); -void proc_reparent(struct proc *child, struct proc *newparent); -int securelevel_ge(struct ucred *cr, int level); +void proc_linkup(struct proc *_p, struct ksegrp *_kg, + struct kse *_ke, struct thread *_td); +void proc_reparent(struct proc *_child, struct proc *_newparent); +int securelevel_ge(struct ucred *_cr, int _level); int securelevel_gt(struct ucred *cr, int level); -void setrunnable(struct thread *); -void setrunqueue(struct thread *); -void setsugid(struct proc *p); +void setrunnable(struct thread *_td); +void setrunqueue(struct thread *_td); +void setsugid(struct proc *_p); void sleepinit(void); -void stopevent(struct proc *, u_int, u_int); +void stopevent(struct proc *_p, u_int _arg1, u_int _arg2); void cpu_idle(void); void cpu_switch(void); void cpu_throw(void) __dead2; -void unsleep(struct thread *); -void userret(struct thread *, struct trapframe *, u_int); +void unsleep(struct thread *_td); +void userret(struct thread *_td, struct trapframe *_tf, u_int _arg); -void cpu_exit(struct thread *); -void cpu_sched_exit(struct thread *); -void exit1(struct thread *, int) __dead2; -void cpu_fork(struct thread *, struct proc *, struct thread *, int); -void cpu_set_fork_handler(struct thread *, void (*)(void *), void *); -void cpu_wait(struct proc *); +void cpu_exit(struct thread *_td); +void cpu_sched_exit(struct thread *_td); +void exit1(struct thread *_td, int _ret) __dead2; +void cpu_fork(struct thread *_td1, struct proc *_p, struct thread *_td2, int _ret); +void cpu_set_fork_handler(struct thread *_td, void (*_pfunc)(void *_arg), void *_ptr); +void cpu_wait(struct proc *_p); /* New in KSE. */ struct ksegrp *ksegrp_alloc(void); -void ksegrp_free(struct ksegrp *kg); -void ksegrp_stash(struct ksegrp *kg); +void ksegrp_free(struct ksegrp *_kg); +void ksegrp_stash(struct ksegrp *_kg); struct kse *kse_alloc(void); -void kse_free(struct kse *ke); -void kse_stash(struct kse *ke); -void cpu_set_upcall(struct thread *td, void *pcb); -void cpu_set_upcall_kse(struct thread *td, struct kse *ke); -void cpu_thread_clean(struct thread *); -void cpu_thread_exit(struct thread *); -void cpu_thread_setup(struct thread *td); -void kse_reassign(struct kse *ke); -void kse_link(struct kse *ke, struct ksegrp *kg); -void kse_unlink(struct kse *ke); -void ksegrp_link(struct ksegrp *kg, struct proc *p); -void ksegrp_unlink(struct ksegrp *kg); -void make_kse_runnable(struct kse *ke); -struct thread *signal_upcall(struct proc *p, int sig); +void kse_free(struct kse *_ke); +void kse_stash(struct kse *_ke); +void cpu_set_upcall(struct thread *_td, void *_pcb); +void cpu_set_upcall_kse(struct thread *_td, struct kse *_ke); +void cpu_thread_clean(struct thread *_td); +void cpu_thread_exit(struct thread *_td); +void cpu_thread_setup(struct thread *_td); +void kse_reassign(struct kse *_ke); +void kse_link(struct kse *_ke, struct ksegrp *_kg); +void kse_unlink(struct kse *_ke); +void ksegrp_link(struct ksegrp *_kg, struct proc *_p); +void ksegrp_unlink(struct ksegrp *_kg); +void make_kse_runnable(struct kse *_ke); +struct thread *signal_upcall(struct proc *_p, int _sig); struct thread *thread_alloc(void); void thread_exit(void) __dead2; -int thread_export_context(struct thread *td); -void thread_free(struct thread *td); -void thread_getcontext(struct thread *td, ucontext_t *uc); -void thread_link(struct thread *td, struct ksegrp *kg); +int thread_export_context(struct thread *_td); +void thread_free(struct thread *_td); +void thread_getcontext(struct thread *_td, ucontext_t *_uc); +void thread_link(struct thread *_td, struct ksegrp *_kg); void thread_reap(void); -struct thread *thread_schedule_upcall(struct thread *td, struct kse *ke); -int thread_setcontext(struct thread *td, ucontext_t *uc); -int thread_single(int how); +struct thread *thread_schedule_upcall(struct thread *_td, struct kse *_ke); +int thread_setcontext(struct thread *_td, ucontext_t *_uc); +int thread_single(int _how); #define SINGLE_NO_EXIT 0 /* values for 'how' */ #define SINGLE_EXIT 1 void thread_single_end(void); -void thread_stash(struct thread *td); -int thread_suspend_check(int how); -void thread_suspend_one(struct thread *td); -void thread_unsuspend(struct proc *p); -void thread_unsuspend_one(struct thread *td); -int thread_userret(struct thread *td, struct trapframe *frame); -void thread_user_enter(struct proc *p, struct thread *td); -void thread_wait(struct proc *p); -int thread_add_ticks_intr(int user, uint ticks); +void thread_stash(struct thread *_td); +int thread_suspend_check(int _how); +void thread_suspend_one(struct thread *_td); +void thread_unsuspend(struct proc *_p); +void thread_unsuspend_one(struct thread *_td); +int thread_userret(struct thread *_td, struct trapframe *_frame); +void thread_user_enter(struct proc *_p, struct thread *_td); +void thread_wait(struct proc *_p); +int thread_add_ticks_intr(int _user, uint _ticks); -void thread_sanity_check(struct thread *td, char *); +void thread_sanity_check(struct thread *_td, char *_ch); #endif /* _KERNEL */ #endif /* !_SYS_PROC_H_ */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302012246.h11MkEaX028068>