@@ -329,6 +329,14 @@ int get_num_procs(void) {
329329}
330330#endif
331331
332+ #if defined(__hermit__ )
333+ extern long sys_get_processor_count ();
334+
335+ int get_num_procs (void ) {
336+ return sys_get_processor_count ();
337+ }
338+ #endif
339+
332340#ifdef OS_AIX
333341int get_num_procs (void ) {
334342 static int nums = 0 ;
@@ -438,7 +446,7 @@ void openblas_fork_handler(void)
438446 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035
439447 // In the mean time build with USE_OPENMP=0 or link against another
440448 // implementation of OpenMP.
441- #if !((defined(OS_WINDOWS ) && !defined(OS_CYGWIN_NT )) || defined(OS_ANDROID )) && defined(SMP_SERVER )
449+ #if !((defined(OS_WINDOWS ) && !defined(OS_CYGWIN_NT )) || defined(OS_ANDROID ) || defined( __hermit__ ) ) && defined(SMP_SERVER )
442450 int err ;
443451 err = pthread_atfork ((void (* )(void )) BLASFUNC (blas_thread_shutdown ), NULL , blas_memory_init );
444452 if (err != 0 )
@@ -1904,6 +1912,15 @@ int get_num_procs(void) {
19041912}
19051913#endif
19061914
1915+ #if defined(__hermit__ )
1916+ extern long sys_get_processor_count ();
1917+
1918+ int get_num_procs (void ) {
1919+ return sys_get_processor_count ();
1920+ }
1921+ #endif
1922+
1923+
19071924#ifdef OS_AIX
19081925int get_num_procs (void ) {
19091926 static int nums = 0 ;
@@ -2009,7 +2026,7 @@ void openblas_fork_handler(void)
20092026 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035
20102027 // In the mean time build with USE_OPENMP=0 or link against another
20112028 // implementation of OpenMP.
2012- #if !((defined(OS_WINDOWS ) && !defined(OS_CYGWIN_NT )) || defined(OS_ANDROID )) && defined(SMP_SERVER )
2029+ #if !((defined(OS_WINDOWS ) && !defined(OS_CYGWIN_NT )) || defined(OS_ANDROID ) || defined( __hermit__ ) ) && defined(SMP_SERVER )
20132030 int err ;
20142031 err = pthread_atfork ((void (* )(void )) BLASFUNC (blas_thread_shutdown ), NULL , NULL );
20152032 if (err != 0 )
0 commit comments