Esempio n. 1
0
        /// <summary>
        /// Sets the thread exit callback.
        /// </summary>
        private static unsafe int SetThreadExitCallbackLibpthread(IntPtr callbackPtr)
        {
            int tlsIndex;

            CheckResult(NativeMethodsLinuxLibpthread.pthread_key_create(new IntPtr(&tlsIndex), callbackPtr));

            return(tlsIndex);
        }
Esempio n. 2
0
 /// <summary>
 /// Enables thread exit event for current thread.
 /// </summary>
 private static void EnableCurrentThreadExitEventLibpthread(int callbackId, IntPtr threadLocalValue)
 {
     CheckResult(NativeMethodsLinuxLibpthread.pthread_setspecific(callbackId, threadLocalValue));
 }
Esempio n. 3
0
 /// <summary>
 /// Removes thread exit callback that has been set with <see cref="SetThreadExitCallback"/>.
 /// </summary>
 private static void RemoveThreadExitCallbackLibpthread(int callbackId)
 {
     CheckResult(NativeMethodsLinuxLibpthread.pthread_key_delete(callbackId));
 }