diff --git a/lib/isc/task.c b/lib/isc/task.c index e4b9b637ee..72e1c7433b 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: task.c,v 1.105 2007/06/18 23:47:44 tbox Exp $ */ +/* $Id: task.c,v 1.106 2008/03/27 21:08:51 jinmei Exp $ */ /*! \file * \author Principal Author: Bob Halley @@ -44,8 +44,6 @@ #include "task_p.h" #endif /* ISC_PLATFORM_USETHREADS */ -#define ISC_TASK_NAMES 1 - #ifdef ISC_TASK_TRACE #define XTRACE(m) fprintf(stderr, "task %p thread %lu: %s\n", \ task, isc_thread_self(), (m)) @@ -90,10 +88,8 @@ struct isc_task { unsigned int quantum; unsigned int flags; isc_stdtime_t now; -#ifdef ISC_TASK_NAMES char name[16]; void * tag; -#endif /* Locked by task manager lock. */ LINK(isc_task_t) link; LINK(isc_task_t) ready_link; @@ -203,10 +199,8 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum, task->quantum = quantum; task->flags = 0; task->now = 0; -#ifdef ISC_TASK_NAMES memset(task->name, 0, sizeof(task->name)); task->tag = NULL; -#endif INIT_LINK(task, link); INIT_LINK(task, ready_link); @@ -701,17 +695,11 @@ isc_task_setname(isc_task_t *task, const char *name, void *tag) { REQUIRE(VALID_TASK(task)); -#ifdef ISC_TASK_NAMES LOCK(&task->lock); memset(task->name, 0, sizeof(task->name)); strncpy(task->name, name, sizeof(task->name) - 1); task->tag = tag; UNLOCK(&task->lock); -#else - UNUSED(name); - UNUSED(tag); -#endif - } const char * diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index e66ce9a97f..5192576b70 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.279 2008/01/27 01:58:19 marka Exp $ */ +/* $Id: socket.c,v 1.280 2008/03/27 21:08:51 jinmei Exp $ */ /*! \file */ @@ -65,12 +65,6 @@ #include "socket_p.h" #endif /* ISC_PLATFORM_USETHREADS */ -/* - * Support names for sockets. - */ -#define ISC_SOCKET_NAMES 1 - - #if defined(SO_BSDCOMPAT) && defined(__linux__) #include #endif @@ -166,11 +160,8 @@ struct isc_socket { unsigned int references; int fd; int pf; - -#ifdef ISC_SOCKET_NAMES char name[16]; void * tag; -#endif ISC_LIST(isc_socketevent_t) send_list; ISC_LIST(isc_socketevent_t) recv_list; @@ -1696,10 +1687,8 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, } #endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */ -#ifdef ISC_SOCKET_NAMES memset(sock->name, 0, sizeof(sock->name)); sock->tag = NULL; -#endif sock->references = 1; *socketp = sock; @@ -4048,17 +4037,11 @@ isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) { REQUIRE(VALID_SOCKET(socket)); -#ifdef ISC_SOCKET_NAMES LOCK(&socket->lock); memset(socket->name, 0, sizeof(socket->name)); strncpy(socket->name, name, sizeof(socket->name) - 1); socket->tag = tag; UNLOCK(&socket->lock); -#else - UNUSED(name); - UNUSED(tag); -#endif - } const char * diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index 5a4d6743ec..2d19dd1096 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.52 2007/08/28 00:39:15 marka Exp $ */ +/* $Id: socket.c,v 1.53 2008/03/27 21:08:52 jinmei Exp $ */ /* This code has been rewritten to take advantage of Windows Sockets * I/O Completion Ports and Events. I/O Completion Ports is ONLY @@ -92,8 +92,6 @@ #include "errno2result.h" -#define ISC_SOCKET_NAMES 1 - /* * Define this macro to control the behavior of connection * resets on UDP sockets. See Microsoft KnowledgeBase Article Q263823 @@ -226,11 +224,8 @@ struct isc_socket { unsigned int references; SOCKET fd; int pf; - -#ifdef ISC_SOCKET_NAMES char name[16]; void * tag; -#endif ISC_LIST(isc_socketevent_t) send_list; ISC_LIST(isc_socketevent_t) recv_list; @@ -3865,17 +3860,11 @@ isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) { REQUIRE(VALID_SOCKET(socket)); -#ifdef ISC_SOCKET_NAMES LOCK(&socket->lock); memset(socket->name, 0, sizeof(socket->name)); strncpy(socket->name, name, sizeof(socket->name) - 1); socket->tag = tag; UNLOCK(&socket->lock); -#else - UNUSED(name); - UNUSED(tag); -#endif - } const char *