Bläddra i källkod

HDFS-11710. hadoop-hdfs-native-client build fails in trunk in Windows after HDFS-11529 (Contributed by Sailesh Mukil)

Vinayakumar B 8 år sedan
förälder
incheckning
b0f54ea035

+ 7 - 0
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/os/windows/thread_local_storage.c

@@ -61,6 +61,13 @@ static void detachCurrentThreadFromJvm()
   free(state);
 }
 
+void hdfsThreadDestructor(void *v)
+{
+  // Ignore 'v' since it will contain the state and we will obtain it in the below
+  // call anyway.
+  detachCurrentThreadFromJvm();
+}
+
 /**
  * Unlike pthreads, the Windows API does not seem to provide a convenient way to
  * hook a callback onto thread shutdown.  However, the Windows portable