X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Ftaskstats_kern.h;h=7e9680f4afdd9290415c1a8b4ccf8594bf29bd14;hb=7616ee95f27a04fd5a6434e9ef4a82cec4b2807c;hp=fc9da2e26443911d266883924da1499d73713e4a;hpb=6f44993fe1d7b2b097f6ac60cd5835c6f5ca0874;p=linux-2.6 diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index fc9da2e264..7e9680f4af 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h @@ -9,46 +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) {}