]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Rx: use osi_Assert/osi_Panic instead of assert
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 14 Oct 2010 21:24:33 +0000 (17:24 -0400)
committerDerrick Brashear <shadow@dementia.org>
Thu, 28 Oct 2010 04:12:52 +0000 (21:12 -0700)
Avoid using the openafs src/util/assert.h implementation for Rx
and Rx security classes.  Use the built-in osi_Assert() and osi_Panic()
functionality instead.  This avoids all references to assert.h except
for rx_pthread.c (Unix only) which requires it for the assert()
references in the src/util/pthread_nosigs.h macros.

Reviewed-on: http://gerrit.openafs.org/2987
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 3616cdc306f58f90be1cb4f524aa5720d8d638fe)
Change-Id: I45f839aeba7d7611ab170f6c58cc30547a2e640f
Reviewed-on: http://gerrit.openafs.org/3169
Tested-by: Derrick Brashear <shadow@dementia.org>
15 files changed:
src/des/stats.h
src/rx/rx.c
src/rx/rx_clock.c
src/rx/rx_conncache.c
src/rx/rx_event.c
src/rx/rx_globals.h
src/rx/rx_lwp.c
src/rx/rx_misc.c
src/rx/rx_packet.c
src/rx/rx_pthread.c
src/rx/rx_rdwr.c
src/rx/rx_user.c
src/rxkad/rxkad_client.c
src/rxkad/rxkad_common.c
src/rxkad/rxkad_server.c

index bbb188a21cf780131b3da6510472b689075b4c88..17d4f11401e9c23d219b8c3293348c17f4506795 100644 (file)
@@ -66,7 +66,6 @@ struct rxkad_global_stats {
 };
 
 #include <pthread.h>
-#include <assert.h>
 extern pthread_mutex_t rxkad_global_stats_lock;
 extern pthread_key_t rxkad_stats_key;
 
@@ -78,14 +77,14 @@ extern int rxkad_stats_agg(rxkad_stats_t *);
 #define BEGIN do {
 #define END   } while(0)
 #endif
-#define RXKAD_GLOBAL_STATS_LOCK assert(pthread_mutex_lock(&rxkad_global_stats_lock)==0)
-#define RXKAD_GLOBAL_STATS_UNLOCK assert(pthread_mutex_unlock(&rxkad_global_stats_lock)==0)
+#define RXKAD_GLOBAL_STATS_LOCK osi_Assert(pthread_mutex_lock(&rxkad_global_stats_lock)==0)
+#define RXKAD_GLOBAL_STATS_UNLOCK osi_Assert(pthread_mutex_unlock(&rxkad_global_stats_lock)==0)
 #define GET_RXKAD_STATS(stats) rxkad_stats_agg(stats)
 #define GET_RXKAD_THR_STATS(rxkad_stats) \
     BEGIN \
         (rxkad_stats) = ((rxkad_stats_t*)pthread_getspecific(rxkad_stats_key)); \
         if ((rxkad_stats) == NULL) { \
-            assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
+            osi_Assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
         } \
     END
 #define INC_RXKAD_STATS(stats_elem) \
@@ -93,7 +92,7 @@ extern int rxkad_stats_agg(rxkad_stats_t *);
         rxkad_stats_t * rxkad_stats; \
         rxkad_stats = ((rxkad_stats_t*)pthread_getspecific(rxkad_stats_key)); \
         if (rxkad_stats == NULL) { \
-            assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
+            osi_Assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
         } \
         rxkad_stats->stats_elem++; \
     END
@@ -102,7 +101,7 @@ extern int rxkad_stats_agg(rxkad_stats_t *);
         rxkad_stats_t * rxkad_stats; \
         rxkad_stats = ((rxkad_stats_t*)pthread_getspecific(rxkad_stats_key)); \
         if (rxkad_stats == NULL) { \
-            assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
+            osi_Assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
         } \
         rxkad_stats->stats_elem--; \
     END
@@ -112,7 +111,7 @@ extern int rxkad_stats_agg(rxkad_stats_t *);
         rxkad_stats_t * rxkad_stats; \
         rxkad_stats = ((rxkad_stats_t*)pthread_getspecific(rxkad_stats_key)); \
         if (rxkad_stats == NULL) { \
-            assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
+            osi_Assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
         } \
         rxkad_stats->stats_elem += inc_value; \
     END
@@ -121,7 +120,7 @@ extern int rxkad_stats_agg(rxkad_stats_t *);
         rxkad_stats_t * rxkad_stats; \
         rxkad_stats = ((rxkad_stats_t*)pthread_getspecific(rxkad_stats_key)); \
         if (rxkad_stats == NULL) { \
-            assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
+            osi_Assert(((rxkad_stats) = rxkad_thr_stats_init()) != NULL); \
         } \
         rxkad_stats->stats_elem -= dec_value; \
     END
index 05df264ae2e25d1e7095090e774f5a4432be2c9d..2f885ded7095463f6c2da4289c7485199d1d48a9 100644 (file)
@@ -160,7 +160,6 @@ static unsigned int rxi_rpc_process_stat_cnt;
 #endif
 
 #ifdef AFS_PTHREAD_ENV
-#include <assert.h>
 
 /*
  * Use procedural initialization of mutexes/condition variables
@@ -217,12 +216,12 @@ rxi_InitPthread(void)
     MUTEX_INIT(&rxkad_random_mutex, "rxkad random", MUTEX_DEFAULT, 0);
     MUTEX_INIT(&rx_debug_mutex, "debug", MUTEX_DEFAULT, 0);
 
-    assert(pthread_cond_init
+    osi_Assert(pthread_cond_init
           (&rx_event_handler_cond, (const pthread_condattr_t *)0) == 0);
-    assert(pthread_cond_init(&rx_listener_cond, (const pthread_condattr_t *)0)
+    osi_Assert(pthread_cond_init(&rx_listener_cond, (const pthread_condattr_t *)0)
           == 0);
-    assert(pthread_key_create(&rx_thread_id_key, NULL) == 0);
-    assert(pthread_key_create(&rx_ts_info_key, NULL) == 0);
+    osi_Assert(pthread_key_create(&rx_thread_id_key, NULL) == 0);
+    osi_Assert(pthread_key_create(&rx_ts_info_key, NULL) == 0);
 
     rxkad_global_stats_init();
 
@@ -247,8 +246,7 @@ rxi_InitPthread(void)
 }
 
 pthread_once_t rx_once_init = PTHREAD_ONCE_INIT;
-#define INIT_PTHREAD_LOCKS \
-assert(pthread_once(&rx_once_init, rxi_InitPthread)==0)
+#define INIT_PTHREAD_LOCKS osi_Assert(pthread_once(&rx_once_init, rxi_InitPthread)==0)
 /*
  * The rx_stats_mutex mutex protects the following global variables:
  * rxi_lowConnRefCount
index 572f64d36e46022bde1ee35621d2c56769020e8f..d2ce7e9d212f5a5620a890788105ad09da7526dd 100644 (file)
@@ -41,7 +41,6 @@
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
-#include <assert.h>
 #include "rx.h"
 #include "rx_clock.h"
 #endif
@@ -74,10 +73,8 @@ clock_Sync(void)
 
     signal(SIGALRM, SIG_IGN);
     if (setitimer(ITIMER_REAL, &itimer, &otimer) != 0) {
-       fprintf(stderr, "clock:  could not set interval timer; \
-                               aborted(errno=%d)\n", errno);
-       fflush(stderr);
-       assert(0);
+       osi_Panic("clock:  could not set interval timer; aborted(errno=%d)\n",
+                  errno);
     }
     if (relclock_epoch.usec + startvalue.usec >= otimer.it_value.tv_usec) {
        relclock_epoch.sec = relclock_epoch.sec +
index d62420408326c7af8e407313c42cae5a08adb729..506935a7e610a18251e5cd19a7cfb5e023c32154 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <sys/types.h>
 #include <errno.h>
-#include <assert.h>
 #include "rx.h"
 
 /*
index f381e115261243322b9d919d987fa0b3df79f88e..bdae086b9939784c206969f3f52b2ca9019921aa 100644 (file)
@@ -106,7 +106,6 @@ afs_kmutex_t rxevent_lock;
  * rxevent_initialized
  */
 
-#include <assert.h>
 afs_kmutex_t rx_event_mutex;
 #define LOCK_EV_INIT MUTEX_ENTER(&rx_event_mutex)
 #define UNLOCK_EV_INIT MUTEX_EXIT(&rx_event_mutex)
index 7620481d4db38414df0fdae3ec57f788ae862278..5554b4f5762249e634c346d46f9961345420d16f 100644 (file)
@@ -196,7 +196,7 @@ EXT struct rx_ts_info_t * rx_ts_info_init(void);   /* init function for thread-s
     do { \
         ts_info_p = (struct rx_ts_info_t*)pthread_getspecific(rx_ts_info_key); \
         if (ts_info_p == NULL) { \
-            assert((ts_info_p = rx_ts_info_init()) != NULL); \
+            osi_Assert((ts_info_p = rx_ts_info_init()) != NULL); \
         } \
     } while(0)
 #endif /* AFS_PTHREAD_ENV */
index fd15de580e9ce353b3034c4a9595c9ca33001403..2a81b03651da9d7b89bfe50771e9514c2fe7d668 100644 (file)
@@ -42,7 +42,6 @@
 # include <sys/ioctl.h>
 # include <sys/time.h>
 #endif
-# include <assert.h>
 # include "rx.h"
 # include "rx_globals.h"
 # include <lwp.h>
@@ -179,8 +178,7 @@ rxi_ListenerProc(fd_set * rfds, int *tnop, struct rx_call **newcallp)
     nextPollTime = 0;
     code = LWP_CurrentProcess(&pid);
     if (code) {
-       fprintf(stderr, "rxi_Listener: Can't get my pid.\n");
-       assert(0);
+       osi_Panic("rxi_Listener: Can't get my pid.\n");
     }
     rx_listenerPid = pid;
     if (swapNameProgram)
@@ -335,11 +333,11 @@ rx_ListenerProc(void *dummy)
        newcall = NULL;
        threadID = -1;
        rxi_ListenerProc(rfds, &threadID, &newcall);
-       /* assert(threadID != -1); */
-       /* assert(newcall != NULL); */
+       /* osi_Assert(threadID != -1); */
+       /* osi_Assert(newcall != NULL); */
        sock = OSI_NULLSOCKET;
        rxi_ServerProc(threadID, newcall, &sock);
-       /* assert(sock != OSI_NULLSOCKET); */
+       /* osi_Assert(sock != OSI_NULLSOCKET); */
     }
     /* not reached */
     return NULL;
@@ -369,11 +367,11 @@ rx_ServerProc(void * unused)
     while (1) {
        sock = OSI_NULLSOCKET;
        rxi_ServerProc(threadID, newcall, &sock);
-       /* assert(sock != OSI_NULLSOCKET); */
+       /* osi_Assert(sock != OSI_NULLSOCKET); */
        newcall = NULL;
        rxi_ListenerProc(rfds, &threadID, &newcall);
-       /* assert(threadID != -1); */
-       /* assert(newcall != NULL); */
+       /* osi_Assert(threadID != -1); */
+       /* osi_Assert(newcall != NULL); */
     }
     /* not reached */
     return NULL;
index 2883849825b2fcdf36da4d01f1bb948384cbaca2..bdbeab295220af21d06a6aa0732bfe0cb2a1cc5a 100644 (file)
@@ -103,7 +103,6 @@ ntoh_syserr_conv(int code)
  * osi_allocsize
  */
 
-#include <assert.h>
 afs_kmutex_t osi_malloc_mutex;
 #define LOCK_MALLOC_STATS MUTEX_ENTER(&osi_malloc_mutex);
 #define UNLOCK_MALLOC_STATS MUTEX_EXIT(&osi_malloc_mutex);
index a8b84cb3471815e8e7f5ba23447d915d605613da..1850da9ff922764cf0a688993b2153be57ef808a 100644 (file)
@@ -79,7 +79,6 @@
 #include "rx_packet.h"
 #include "rx_globals.h"
 #include <lwp.h>
-#include <assert.h>
 #include <string.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -2534,7 +2533,7 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn,
 #ifdef RXDEBUG
     }
 
-    assert(p != NULL);
+    osi_Assert(p != NULL);
 
     dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %"AFS_PTR_FMT" resend %d.%.3d len %d",
           deliveryType, p->header.serial, rx_packetTypes[p->header.type - 1], ntohl(peer->host),
index c4e176484246ac7baf77473fb476c5edae14d0a4..0576d767e68806dc109ef16e0fdc433e9ecf1b3d 100644 (file)
 # include <sys/ioctl.h>
 # include <sys/time.h>
 # include <unistd.h>
+# include <assert.h>
 #endif
 #include <sys/stat.h>
 #include <rx/rx.h>
 #include <rx/rx_globals.h>
-#include <assert.h>
 #include <rx/rx_pthread.h>
 #include <rx/rx_clock.h>
 
@@ -108,14 +108,11 @@ rxi_StartServerProc(void *(*proc) (void *), int stacksize)
     AFS_SIGSET_DECL;
 
     if (pthread_attr_init(&tattr) != 0) {
-       dpf(("Unable to Create Rx server thread (pthread_attr_init)\n"));
-       assert(0);
+       osi_Panic("Unable to Create Rx server thread (pthread_attr_init)\n");
     }
 
     if (pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED) != 0) {
-       dpf
-           (("Unable to Create Rx server thread (pthread_attr_setdetachstate)\n"));
-       assert(0);
+       osi_Panic("Unable to Create Rx server thread (pthread_attr_setdetachstate)\n");
     }
 
     /*
@@ -123,8 +120,7 @@ rxi_StartServerProc(void *(*proc) (void *), int stacksize)
      */
     AFS_SIGSET_CLEAR();
     if (pthread_create(&thread, &tattr, server_entry, (void *)proc) != 0) {
-       dpf(("Unable to Create Rx server thread\n"));
-       assert(0);
+       osi_Panic("Unable to Create Rx server thread\n");
     }
     AFS_SIGSET_RESTORE();
 }
@@ -228,8 +224,7 @@ rxi_ListenerProc(osi_socket sock, int *tnop, struct rx_call **newcallp)
        } else {
            if (!(p = rxi_AllocPacket(RX_PACKET_CLASS_RECEIVE))) {
                /* Could this happen with multiple socket listeners? */
-               dpf(("rxi_Listener: no packets!"));     /* Shouldn't happen */
-               assert(0);
+               osi_Panic("rxi_Listener: no packets!"); /* Shouldn't happen */
            }
        }
 
@@ -260,12 +255,12 @@ rx_ListenerProc(void *argp)
        newcall = NULL;
        threadID = -1;
        rxi_ListenerProc(sock, &threadID, &newcall);
-       /* assert(threadID != -1); */
-       /* assert(newcall != NULL); */
+       /* osi_Assert(threadID != -1); */
+       /* osi_Assert(newcall != NULL); */
        sock = OSI_NULLSOCKET;
-       assert(pthread_setspecific(rx_thread_id_key, (void *)(intptr_t)threadID) == 0);
+       osi_Assert(pthread_setspecific(rx_thread_id_key, (void *)(intptr_t)threadID) == 0);
        rxi_ServerProc(threadID, newcall, &sock);
-       /* assert(sock != OSI_NULLSOCKET); */
+       /* osi_Assert(sock != OSI_NULLSOCKET); */
     }
     /* not reached */
     return NULL;
@@ -307,13 +302,13 @@ rx_ServerProc(void * dummy)
 
     while (1) {
        sock = OSI_NULLSOCKET;
-       assert(pthread_setspecific(rx_thread_id_key, (void *)(intptr_t)threadID) == 0);
+       osi_Assert(pthread_setspecific(rx_thread_id_key, (void *)(intptr_t)threadID) == 0);
        rxi_ServerProc(threadID, newcall, &sock);
-       /* assert(sock != OSI_NULLSOCKET); */
+       /* osi_Assert(sock != OSI_NULLSOCKET); */
        newcall = NULL;
        rxi_ListenerProc(sock, &threadID, &newcall);
-       /* assert(threadID != -1); */
-       /* assert(newcall != NULL); */
+       /* osi_Assert(threadID != -1); */
+       /* osi_Assert(newcall != NULL); */
     }
     /* not reached */
     return NULL;
@@ -338,22 +333,17 @@ rxi_StartListener(void)
                return;
 
     if (pthread_attr_init(&tattr) != 0) {
-       dpf
-           (("Unable to create Rx event handling thread (pthread_attr_init)\n"));
-       assert(0);
+       osi_Panic("Unable to create Rx event handling thread (pthread_attr_init)\n");
     }
 
     if (pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED) != 0) {
-       dpf
-           (("Unable to create Rx event handling thread (pthread_attr_setdetachstate)\n"));
-       assert(0);
+       osi_Panic("Unable to create Rx event handling thread (pthread_attr_setdetachstate)\n");
     }
 
     AFS_SIGSET_CLEAR();
     if (pthread_create(&event_handler_thread, &tattr, event_handler, NULL) !=
        0) {
-       dpf(("Unable to create Rx event handling thread\n"));
-       assert(0);
+       osi_Panic("Unable to create Rx event handling thread\n");
     }
     MUTEX_ENTER(&rx_pthread_mutex);
     ++rxi_pthread_hinum;
@@ -378,21 +368,16 @@ rxi_Listen(osi_socket sock)
     AFS_SIGSET_DECL;
 
     if (pthread_attr_init(&tattr) != 0) {
-       dpf
-           (("Unable to create socket listener thread (pthread_attr_init)\n"));
-       assert(0);
+       osi_Panic("Unable to create socket listener thread (pthread_attr_init)\n");
     }
 
     if (pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED) != 0) {
-       dpf
-           (("Unable to create socket listener thread (pthread_attr_setdetachstate)\n"));
-       assert(0);
+       osi_Panic("Unable to create socket listener thread (pthread_attr_setdetachstate)\n");
     }
 
     AFS_SIGSET_CLEAR();
     if (pthread_create(&thread, &tattr, rx_ListenerProc, (void *)(intptr_t)sock) != 0) {
-       dpf(("Unable to create socket listener thread\n"));
-       assert(0);
+       osi_Panic("Unable to create socket listener thread\n");
     }
     MUTEX_ENTER(&rx_pthread_mutex);
     ++rxi_pthread_hinum;
@@ -451,7 +436,7 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 struct rx_ts_info_t * rx_ts_info_init(void) {
     struct rx_ts_info_t * rx_ts_info;
     rx_ts_info = (rx_ts_info_t *) malloc(sizeof(rx_ts_info_t));
-    assert(rx_ts_info != NULL && pthread_setspecific(rx_ts_info_key, rx_ts_info) == 0);
+    osi_Assert(rx_ts_info != NULL && pthread_setspecific(rx_ts_info_key, rx_ts_info) == 0);
     memset(rx_ts_info, 0, sizeof(rx_ts_info_t));
 #ifdef RX_ENABLE_TSFPQ
     queue_Init(&rx_ts_info->_FPQ);
index d0d6a37fc4dc3869be60060ee396c624f06920fa..50bad2cccd14d420aa225e1000bdb58618860d68 100644 (file)
@@ -263,7 +263,7 @@ rxi_ReadProc(struct rx_call *call, char *buf,
            }
            MUTEX_EXIT(&call->lock);
        } else
-           /* assert(cp); */
+           /* osi_Assert(cp); */
            /* MTUXXX  this should be replaced by some error-recovery code before shipping */
            /* yes, the following block is allowed to be the ELSE clause (or not) */
            /* It's possible for call->nLeft to be smaller than any particular
index 1b6d829e80b92e24632a84b3f39b7d7ce967355c..2e44176d84f728e317ad8caecc742317a672ef4e 100644 (file)
@@ -61,7 +61,6 @@
 # include "rx_globals.h"
 
 #ifdef AFS_PTHREAD_ENV
-#include <assert.h>
 
 /*
  * The rx_if_init_mutex mutex protects the following global variables:
index a5c410a9151150a1d93094c0dee1b5da432b50f5..04f3ecbc490549a2cfc11d7f86a4fc15f744a597 100644 (file)
@@ -96,10 +96,9 @@ static struct rx_securityOps rxkad_client_ops = {
  * counter
  * rxkad_EpochWasSet
  */
-#include <assert.h>
 pthread_mutex_t rxkad_client_uid_mutex;
-#define LOCK_CUID assert(pthread_mutex_lock(&rxkad_client_uid_mutex)==0)
-#define UNLOCK_CUID assert(pthread_mutex_unlock(&rxkad_client_uid_mutex)==0)
+#define LOCK_CUID osi_Assert(pthread_mutex_lock(&rxkad_client_uid_mutex)==0)
+#define UNLOCK_CUID osi_Assert(pthread_mutex_unlock(&rxkad_client_uid_mutex)==0)
 #else
 #define LOCK_CUID
 #define UNLOCK_CUID
index 11c4d60b7e5ffa19d4bdf9623e11b9e8eaad15b8..ad06d3420a52f445499c91c37e9d82b99a29aaa2 100644 (file)
@@ -103,12 +103,12 @@ struct rxkad_stats rxkad_stats = { { 0 } };
            (ptr)->prev->next = (ptr);           \
        else                                     \
            (head) = (ptr);                      \
-       assert((head) && ((head)->prev == NULL)); \
+       osi_Assert((head) && ((head)->prev == NULL)); \
     } while(0)
 
 void rxkad_global_stats_init(void) {
-    assert(pthread_mutex_init(&rxkad_global_stats_lock, (const pthread_mutexattr_t *)0) == 0);
-    assert(pthread_key_create(&rxkad_stats_key, NULL) == 0);
+    osi_Assert(pthread_mutex_init(&rxkad_global_stats_lock, (const pthread_mutexattr_t *)0) == 0);
+    osi_Assert(pthread_key_create(&rxkad_stats_key, NULL) == 0);
     memset(&rxkad_global_stats, 0, sizeof(rxkad_global_stats));
 }
 
@@ -116,7 +116,7 @@ rxkad_stats_t *
 rxkad_thr_stats_init(void) {
     rxkad_stats_t * rxkad_stats;
     rxkad_stats = (rxkad_stats_t *)malloc(sizeof(rxkad_stats_t));
-    assert(rxkad_stats != NULL && pthread_setspecific(rxkad_stats_key,rxkad_stats) == 0);
+    osi_Assert(rxkad_stats != NULL && pthread_setspecific(rxkad_stats_key,rxkad_stats) == 0);
     memset(rxkad_stats,0,sizeof(rxkad_stats_t));
     RXKAD_GLOBAL_STATS_LOCK;
     DLL_INSERT_TAIL(rxkad_stats, rxkad_global_stats.first, rxkad_global_stats.last, next, prev);
@@ -126,7 +126,7 @@ rxkad_thr_stats_init(void) {
 
 int rxkad_stats_agg(rxkad_stats_t * rxkad_stats) {
     rxkad_stats_t * thr_stats;
-    assert(rxkad_stats != NULL);
+    osi_Assert(rxkad_stats != NULL);
     memset(rxkad_stats, 0, sizeof(rxkad_stats_t));
     RXKAD_GLOBAL_STATS_LOCK;
     for (thr_stats = rxkad_global_stats.first; thr_stats != NULL; thr_stats = thr_stats->next) {
index 7ba99fb05f3e87606a2035ab35525a935dd9d8a5..25467d3cfd435d2b90a0aa5ffe2d5a947fb43fb5 100644 (file)
@@ -80,14 +80,13 @@ static fc_KeySchedule random_int32_schedule;
  * seed
  */
 
-#include <assert.h>
 pthread_mutex_t rxkad_random_mutex
 #ifdef PTHREAD_MUTEX_INITIALIZER
 = PTHREAD_MUTEX_INITIALIZER
 #endif
 ;
-#define LOCK_RM assert(pthread_mutex_lock(&rxkad_random_mutex)==0)
-#define UNLOCK_RM assert(pthread_mutex_unlock(&rxkad_random_mutex)==0)
+#define LOCK_RM osi_Assert(pthread_mutex_lock(&rxkad_random_mutex)==0)
+#define UNLOCK_RM osi_Assert(pthread_mutex_unlock(&rxkad_random_mutex)==0)
 #else
 #define LOCK_RM
 #define UNLOCK_RM