Home | History | Annotate | Download | only in rpcapd

Lines Matching defs:thread

81  * Data for a session managed by a thread.
92 // Structure to refer to a thread.
93 // It includes both a Boolean indicating whether we *have* a thread,
95 // thread; on Windows, we could use an invalid handle to indicate
96 // that we don't have a thread, but there *is* no portable "no thread"
102 HANDLE thread;
104 pthread_t thread;
153 struct thread_handle threaddata; // 'read from daemon and send to client' thread
173 // We don't have a thread yet.
176 // We *shouldn't* have to initialize the thread indicator
181 // There is no "invalid thread handle" value for a UN*X
185 threaddata.thread = INVALID_HANDLE_VALUE;
187 memset(&threaddata.thread, 0, sizeof(threaddata.thread));
828 // The child thread is about to end
837 // Tell the data connection thread main capture
850 // Wait for the thread to exit, so we don't close
855 WaitForSingleObject(threaddata.thread, INFINITE);
858 // Release the thread handle, as we're done with
861 CloseHandle(threaddata.thread);
863 pthread_cancel(threaddata.thread);
1152 // This call should change the current thread to the selected user.
1565 pthread_attr_t detachedAttribute; // temp, needed to set the created thread as detached
1759 // Now we have to create a new thread to receive packets
1761 threaddata->thread = (HANDLE)_beginthreadex(NULL, 0, daemon_thrdatamain,
1763 if (threaddata->thread == 0)
1765 pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "Error creating the data thread");
1769 /* GV we need this to create the thread as detached. */
1770 /* GV otherwise, the thread handle is not destroyed */
1773 ret = pthread_create(&threaddata->thread, &detachedAttribute,
1778 ret, "Error creating the data thread");
1811 CloseHandle(threaddata->thread);
1813 pthread_cancel(threaddata->thread);
1858 // Tell the data connection thread main capture
1872 // Wait for the thread to exit, so we don't close
1877 WaitForSingleObject(threaddata->thread, INFINITE);
1880 // Release the thread handle, as we're done with
1883 CloseHandle(threaddata->thread);
1885 pthread_cancel(threaddata->thread);
1913 // Tell the data connection thread main capture loop to
1926 // Wait for the thread to exit, so we don't close
1931 WaitForSingleObject(threaddata->thread, INFINITE);
1934 // Release the thread handle, as we're done with
1937 CloseHandle(threaddata->thread);
1939 pthread_cancel(threaddata->thread);
2256 "Unable to allocate the buffer for this child thread: snapshot length of %d is negative",
2276 "Unable to allocate the buffer for this child thread");
2281 // Modify thread params so that it can be killed at any time
2288 "Can't set cancel state on data thread: %s", errbuf);
2297 "Can't set cancel type on data thread: %s", errbuf);
2458 \brief Suspends a thread for secs seconds.