diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-02-04 12:51:02 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-02-04 12:51:02 +0100 |
commit | 4507e14b35a496b913ff35e72ad9ae348e69cf38 (patch) | |
tree | 0f9fff258d9434e641f1715f99a054f7ac5bf99b /kern/task.h | |
parent | a693305ea05c405fe05b09061eee1fafc08d9e30 (diff) | |
parent | 7353f589daccb7fb61880d6994f6471e103da902 (diff) |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach
Diffstat (limited to 'kern/task.h')
-rw-r--r-- | kern/task.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kern/task.h b/kern/task.h index e852033..7ae10cd 100644 --- a/kern/task.h +++ b/kern/task.h @@ -48,6 +48,13 @@ #include <vm/vm_types.h> #include <machine/task.h> +/* + * Task name buffer size. The size is chosen so that struct task fits + * into three cache lines. The size of a cache line on a typical CPU + * is 64 bytes. + */ +#define TASK_NAME_SIZE 32 + struct task { /* Synchronization/destruction information */ decl_simple_lock_data(,lock) /* Task's lock */ @@ -113,6 +120,8 @@ struct task { natural_t cow_faults; /* copy-on-write faults counter */ natural_t messages_sent; /* messages sent counter */ natural_t messages_received; /* messages received counter */ + + char name[TASK_NAME_SIZE]; }; #define task_lock(task) simple_lock(&(task)->lock) |