diff --git a/lib/isc/task.c b/lib/isc/task.c index 72e1c7433b..a630173d94 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: task.c,v 1.106 2008/03/27 21:08:51 jinmei Exp $ */ +/* $Id: task.c,v 1.107 2008/03/27 23:46:57 tbox Exp $ */ /*! \file * \author Principal Author: Bob Halley @@ -801,9 +801,9 @@ dispatch(isc_taskmgr_t *manager) { * task lock. */ while ((EMPTY(manager->ready_tasks) || - manager->exclusive_requested) && - !FINISHED(manager)) - { + manager->exclusive_requested) && + !FINISHED(manager)) + { XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL, ISC_MSG_WAIT, "wait")); @@ -1016,7 +1016,7 @@ manager_free(isc_taskmgr_t *manager) { isc_mem_t *mctx; #ifdef ISC_PLATFORM_USETHREADS - (void)isc_condition_destroy(&manager->exclusive_granted); + (void)isc_condition_destroy(&manager->exclusive_granted); (void)isc_condition_destroy(&manager->work_available); isc_mem_free(manager->mctx, manager->threads); #endif /* ISC_PLATFORM_USETHREADS */ @@ -1258,19 +1258,19 @@ isc__taskmgr_dispatch(void) { isc_result_t isc_task_beginexclusive(isc_task_t *task) { -#ifdef ISC_PLATFORM_USETHREADS +#ifdef ISC_PLATFORM_USETHREADS isc_taskmgr_t *manager = task->manager; REQUIRE(task->state == task_state_running); LOCK(&manager->lock); if (manager->exclusive_requested) { - UNLOCK(&manager->lock); + UNLOCK(&manager->lock); return (ISC_R_LOCKBUSY); } manager->exclusive_requested = ISC_TRUE; while (manager->tasks_running > 1) { WAIT(&manager->exclusive_granted, &manager->lock); } - UNLOCK(&manager->lock); + UNLOCK(&manager->lock); #else UNUSED(task); #endif @@ -1279,7 +1279,7 @@ isc_task_beginexclusive(isc_task_t *task) { void isc_task_endexclusive(isc_task_t *task) { -#ifdef ISC_PLATFORM_USETHREADS +#ifdef ISC_PLATFORM_USETHREADS isc_taskmgr_t *manager = task->manager; REQUIRE(task->state == task_state_running); LOCK(&manager->lock); diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index 2d19dd1096..18dbff2894 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.53 2008/03/27 21:08:52 jinmei Exp $ */ +/* $Id: socket.c,v 1.54 2008/03/27 23:46:57 tbox Exp $ */ /* This code has been rewritten to take advantage of Windows Sockets * I/O Completion Ports and Events. I/O Completion Ports is ONLY @@ -184,16 +184,16 @@ typedef isc_event_t intev_t; struct msghdr { - void *msg_name; /* optional address */ - u_int msg_namelen; /* size of address */ - WSABUF *msg_iov; /* scatter/gather array */ - u_int msg_iovlen; /* # elements in msg_iov */ - void *msg_control; /* ancillary data, see below */ - u_int msg_controllen; /* ancillary data buffer len */ - int msg_flags; /* flags on received message */ + void *msg_name; /* optional address */ + u_int msg_namelen; /* size of address */ + WSABUF *msg_iov; /* scatter/gather array */ + u_int msg_iovlen; /* # elements in msg_iov */ + void *msg_control; /* ancillary data, see below */ + u_int msg_controllen; /* ancillary data buffer len */ + int msg_flags; /* flags on received message */ int msg_totallen; /* total length of this message */ } msghdr; - + /*% * The size to raise the recieve buffer to. */ @@ -505,7 +505,7 @@ iocompletionport_init(isc_socketmgr_t *manager) { /* * Worker threads for servicing the I/O - */ + */ iocompletionport_createthreads(manager->maxIOCPThreads, manager); } @@ -660,7 +660,7 @@ socket_eventlist_add(event_change_t *evchange, sock_event_list *evlist, */ isc_boolean_t socket_eventlist_delete(event_change_t *evchange, sock_event_list *evlist, - isc_socketmgr_t *manager) + isc_socketmgr_t *manager) { int i; WSAEVENT hEvent; @@ -943,7 +943,7 @@ initialise(void) { void InitSockets(void) { RUNTIME_CHECK(isc_once_do(&initialise_once, - initialise) == ISC_R_SUCCESS); + initialise) == ISC_R_SUCCESS); if (!initialised) exit(1); }