Commit dd6bdf1a authored by unknown's avatar unknown

add check of __NT__ definition for shared_memory for tree 4.1

parent 7e69e33f
...@@ -2327,7 +2327,9 @@ static void handle_connections_methods() ...@@ -2327,7 +2327,9 @@ static void handle_connections_methods()
#endif /* __NT__ */ #endif /* __NT__ */
if (have_tcpip && !opt_disable_networking) if (have_tcpip && !opt_disable_networking)
{ {
#ifdef __NT__
handler_count++; handler_count++;
#endif
if (pthread_create(&hThread,&connection_attrib, if (pthread_create(&hThread,&connection_attrib,
handle_connections_sockets, 0)) handle_connections_sockets, 0))
{ {
...@@ -2338,7 +2340,9 @@ static void handle_connections_methods() ...@@ -2338,7 +2340,9 @@ static void handle_connections_methods()
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
if (opt_enable_shared_memory) if (opt_enable_shared_memory)
{ {
#ifdef __NT__
handler_count++; handler_count++;
#endif
if (pthread_create(&hThread,&connection_attrib, if (pthread_create(&hThread,&connection_attrib,
handle_connections_shared_memory, 0)) handle_connections_shared_memory, 0))
{ {
...@@ -3364,10 +3368,12 @@ Send number of connection to client ...@@ -3364,10 +3368,12 @@ Send number of connection to client
if (!handle_connect_file_map) CloseHandle(handle_connect_file_map); if (!handle_connect_file_map) CloseHandle(handle_connect_file_map);
if (!event_connect_answer) CloseHandle(event_connect_answer); if (!event_connect_answer) CloseHandle(event_connect_answer);
if (!event_connect_request) CloseHandle(event_connect_request); if (!event_connect_request) CloseHandle(event_connect_request);
#ifdef __NT__
pthread_mutex_lock(&LOCK_thread_count); pthread_mutex_lock(&LOCK_thread_count);
handler_count--; handler_count--;
pthread_mutex_unlock(&LOCK_thread_count); pthread_mutex_unlock(&LOCK_thread_count);
pthread_cond_signal(&COND_handler_count); pthread_cond_signal(&COND_handler_count);
#endif
DBUG_RETURN(0); DBUG_RETURN(0);
} }
#endif /* HAVE_SMEM */ #endif /* HAVE_SMEM */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment