Date: Wed, 1 May 2002 19:12:46 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 10631 for review Message-ID: <200205020212.g422Ckj52889@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10631 Change 10631 by mini@mini_stylus on 2002/05/01 19:12:26 Ooops. Do other half of previous commit: actually convert to uma. Affected files ... ... //depot/projects/kse/sys/kern/kern_thread.c#42 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_thread.c#42 (text+ko) ==== @@ -47,6 +47,7 @@ #include <vm/vm.h> #include <vm/pmap.h> +#include <vm/uma.h> #include <vm/vm_map.h> /*static MALLOC_DEFINE(M_PROC, "proc", "Proc structures"); */ @@ -54,7 +55,7 @@ /* * Thread related storage */ -static vm_zone_t thread_zone; +static uma_zone_t thread_zone; /* The cache of available threads */ static tdlist_head_t free_threads; @@ -88,7 +89,8 @@ threadinit(void) { - thread_zone = zinit("THREAD", sizeof (struct thread), 0, 0, 2); + thread_zone = uma_zcreate("THREAD", sizeof (struct thread), NULL, + NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); TAILQ_INIT(&free_threads); } @@ -130,7 +132,7 @@ #endif /* put the thread back in the zone */ - zfree(thread_zone, td); + uma_zfree(thread_zone, td); } } @@ -152,7 +154,7 @@ /* Probably should clean up stuff here */ } else { /* allocate the thread structure itself */ - td = zalloc(thread_zone); + td = uma_zalloc(thread_zone, M_WAITOK); /* assuming we got one, allocate pages for the stack it needs */ if (td) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205020212.g422Ckj52889>