diff options
author | julian <julian@FreeBSD.org> | 2004-10-03 20:06:11 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-10-03 20:06:11 +0000 |
commit | 96dbdb17db1da0c31c5e7ec7142e338c36e4952b (patch) | |
tree | d53f9a0617d14d587eddfe5192df563b237c06ad /sys/kern/kern_thread.c | |
parent | d046f2677cf75e59aeffb80e6cd595932d3b7474 (diff) | |
download | FreeBSD-src-96dbdb17db1da0c31c5e7ec7142e338c36e4952b.zip FreeBSD-src-96dbdb17db1da0c31c5e7ec7142e338c36e4952b.tar.gz |
Always strt out with an initilalised ksegrp structure.
MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index b412cf3..b853520 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -282,13 +282,13 @@ thread_fini(void *mem, int size) * Initialize type-stable parts of a ksegrp (when newly created). */ static int -ksegrp_init(void *mem, int size, int flags) +ksegrp_ctor(void *mem, int size, void *arg, int flags) { struct ksegrp *kg; kg = (struct ksegrp *)mem; + bzero(mem, size); kg->kg_sched = (struct kg_sched *)&kg[1]; - /* sched_newksegrp(kg); */ return (0); } @@ -369,7 +369,7 @@ threadinit(void) tid_zone = uma_zcreate("TID", sizeof(struct tid_bitmap_part), NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); ksegrp_zone = uma_zcreate("KSEGRP", sched_sizeof_ksegrp(), - NULL, NULL, ksegrp_init, NULL, + ksegrp_ctor, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); kseinit(); /* set up kse specific stuff e.g. upcall zone*/ } |