X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Ftaskstats_kern.h;h=7e9680f4afdd9290415c1a8b4ccf8594bf29bd14;hb=11df1f05514beaf0269484191007dbc8d47e0e6f;hp=bd0ecb969c263a1541193725b6ffab55f1740bf0;hpb=c757249af152c59fd74b85e52e8c090acb33d9c0;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index bd0ecb9..7e9680f 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h @@ -9,45 +9,31 @@ #include #include - -enum { - TASKSTATS_MSG_UNICAST, /* send data only to requester */ - TASKSTATS_MSG_MULTICAST, /* send data to a group */ -}; +#include #ifdef CONFIG_TASKSTATS -extern kmem_cache_t *taskstats_cache; +extern struct kmem_cache *taskstats_cache; +extern struct mutex taskstats_exit_mutex; -static inline void taskstats_exit_alloc(struct taskstats **ptidstats, - struct taskstats **ptgidstats) +static inline void taskstats_tgid_init(struct signal_struct *sig) { - *ptidstats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL); - *ptgidstats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL); + sig->stats = NULL; } -static inline void taskstats_exit_free(struct taskstats *tidstats, - struct taskstats *tgidstats) +static inline void taskstats_tgid_free(struct signal_struct *sig) { - if (tidstats) - kmem_cache_free(taskstats_cache, tidstats); - if (tgidstats) - kmem_cache_free(taskstats_cache, tgidstats); + if (sig->stats) + kmem_cache_free(taskstats_cache, sig->stats); } -extern void taskstats_exit_send(struct task_struct *, struct taskstats *, - struct taskstats *); +extern void taskstats_exit(struct task_struct *, int group_dead); extern void taskstats_init_early(void); - #else -static inline void taskstats_exit_alloc(struct taskstats **ptidstats, - struct taskstats **ptgidstats) +static inline void taskstats_exit(struct task_struct *tsk, int group_dead) {} -static inline void taskstats_exit_free(struct taskstats *ptidstats, - struct taskstats *ptgidstats) +static inline void taskstats_tgid_init(struct signal_struct *sig) {} -static inline void taskstats_exit_send(struct task_struct *tsk, - struct taskstats *tidstats, - struct taskstats *tgidstats) +static inline void taskstats_tgid_free(struct signal_struct *sig) {} static inline void taskstats_init_early(void) {}