Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 90054 invoked by uid 500); 5 Oct 2001 17:00:39 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 90037 invoked from network); 5 Oct 2001 17:00:39 -0000 Date: 5 Oct 2001 16:57:40 -0000 Message-ID: <20011005165740.39982.qmail@icarus.apache.org> From: bnicholes@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/threadproc/netware thread.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bnicholes 01/10/05 09:57:40 Modified: threadproc/netware thread.c Log: Fixed NetWare thread handling so that it can deal with multiple argument thread functions Revision Changes Path 1.6 +11 -2 apr/threadproc/netware/thread.c Index: thread.c =================================================================== RCS file: /home/cvs/apr/threadproc/netware/thread.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- thread.c 2001/10/04 00:06:24 1.5 +++ thread.c 2001/10/05 16:57:40 1.6 @@ -89,6 +89,12 @@ return APR_NOTDETACH; } +static void *dummy_worker(void *opaque) +{ + apr_thread_t *thd = (apr_thread_t *)opaque; + return thd->func(thd, thd->data); +} + apr_status_t apr_thread_create(apr_thread_t **new, apr_threadattr_t *attr, apr_thread_start_t func, @@ -123,6 +129,9 @@ } (*new)->cntxt = cont; + (*new)->data = data; + (*new)->func = func; + (*new)->thread_name = (char*)apr_pstrdup(cont, threadName); stat = apr_pool_create(&(*new)->cntxt, cont); if (stat != APR_SUCCESS) { @@ -134,8 +143,8 @@ } (*new)->ctx = NXContextAlloc( - /* void(*start_routine)(void *arg)*/(void (*)(void *)) func, - /* void *arg */ data, + /* void(*start_routine)(void *arg)*/(void (*)(void *)) dummy_worker, + /* void *arg */ (*new), /* int priority */ NX_PRIO_MED, /* NXSize_t stackSize */ stack_size, /* long flags */ NX_CTX_NORMAL,