From owner-p4-projects Wed May 1 19:12:54 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 753BB37B41A; Wed, 1 May 2002 19:12:47 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B77FC37B417 for ; Wed, 1 May 2002 19:12:46 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g422Ckj52889 for perforce@freebsd.org; Wed, 1 May 2002 19:12:46 -0700 (PDT) (envelope-from mini@freebsd.org) Date: Wed, 1 May 2002 19:12:46 -0700 (PDT) Message-Id: <200205020212.g422Ckj52889@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to mini@freebsd.org using -f From: Jonathan Mini Subject: PERFORCE change 10631 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #include +#include #include /*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