diff options
author | t00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7> | 2013-11-03 00:23:03 +0000 |
---|---|---|
committer | t00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7> | 2013-11-03 00:23:03 +0000 |
commit | ce854216b7c0b43c699fde51eafb8f1331a91582 (patch) | |
tree | 97a8be6d5a5f6f43e68585f740d986c3b70dea35 | |
parent | bcfa3d7d4e8813ae20605288d1d6d873705b48c0 (diff) | |
download | usrsctplib-ce854216b7c0b43c699fde51eafb8f1331a91582.tar.gz |
Define and use SCTP_INP_INFO_LOCK_DESTROY.
Thanks to Andrew Galante for reporting the issue.
git-svn-id: http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp/usrsctplib@8660 9df1edf5-d72c-5b5f-11c0-5f5209eb73f7
-rwxr-xr-x | netinet/sctp_pcb.c | 2 | ||||
-rwxr-xr-x | netinet/sctp_process_lock.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/netinet/sctp_pcb.c b/netinet/sctp_pcb.c index 0223bad..8aefb3f 100755 --- a/netinet/sctp_pcb.c +++ b/netinet/sctp_pcb.c @@ -6921,9 +6921,7 @@ sctp_pcb_finish(void) SCTP_IPI_COUNT_DESTROY(); #endif SCTP_STATLOG_DESTROY(); -#if !defined(__Userspace__) SCTP_INP_INFO_LOCK_DESTROY(); -#endif SCTP_WQ_ADDR_DESTROY(); diff --git a/netinet/sctp_process_lock.h b/netinet/sctp_process_lock.h index dbff4c9..1d10985 100755 --- a/netinet/sctp_process_lock.h +++ b/netinet/sctp_process_lock.h @@ -126,6 +126,8 @@ #define SCTP_INP_INFO_LOCK_INIT() \ InitializeCriticalSection(&SCTP_BASE_INFO(ipi_ep_mtx)) +#define SCTP_INP_INFO_LOCK_DESTROY() \ + DeleteCriticalSection(&SCTP_BASE_INFO(ipi_ep_mtx)) #define SCTP_INP_INFO_RLOCK() \ EnterCriticalSection(&SCTP_BASE_INFO(ipi_ep_mtx)) #define SCTP_INP_INFO_TRYLOCK() \ @@ -275,6 +277,8 @@ #define SCTP_INP_INFO_LOCK_INIT() \ (void)pthread_mutex_init(&SCTP_BASE_INFO(ipi_ep_mtx), NULL) +#define SCTP_INP_INFO_LOCK_DESTROY() \ + (void)pthread_mutex_destroy(&SCTP_BASE_INFO(ipi_ep_mtx)) #define SCTP_INP_INFO_RLOCK() \ (void)pthread_mutex_lock(&SCTP_BASE_INFO(ipi_ep_mtx)) #define SCTP_INP_INFO_TRYLOCK() \ |