Index: linux/kernel/exit.c =================================================================== --- linux.orig/kernel/exit.c 2004-08-19 18:12:13.000000000 -0700 +++ linux/kernel/exit.c 2004-08-19 18:57:03.000000000 -0700 @@ -32,6 +32,8 @@ extern void sem_exit (void); extern struct task_struct *child_reaper; +void (*do_eop_acct) (int, struct task_struct *) = NULL; +EXPORT_SYMBOL(do_eop_acct); int getrusage(struct task_struct *, int, struct rusage __user *); @@ -825,6 +827,9 @@ csa_update_integrals(); update_mem_hiwater(); acct_process(code); + /* Handle end-of-process accounting */ + if (do_eop_acct != NULL) + do_eop_acct(code, tsk); __exit_mm(tsk); exit_sem(tsk); Index: linux/include/linux/acct_eop.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux/include/linux/acct_eop.h 2004-08-19 18:48:44.000000000 -0700 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2004 Silicon Graphics, Inc All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane, + * Mountain View, CA 94043, or: + * + * http://www.sgi.com + */ + +/* + * End-of-process Accounting for Linux + * + * This header file contains the hook needed for processing of + * end-of-process accounting record + * + */ + +#ifndef _LINUX_ACCT_EOP_H +#define _LINUX_ACCT_EOP_H + + +extern void (*do_eop_acct) (int, struct task_struct *); + +#endif /* _LINUX_CSA_INTERNAL_H */