diff options
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/kmp.h | 2 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_runtime.c | 15 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_settings.c | 1 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_tasking.c | 4 | ||||
-rw-r--r-- | openmp/runtime/src/z_Linux_util.c | 7 | ||||
-rw-r--r-- | openmp/runtime/src/z_Windows_NT_util.c | 6 |
6 files changed, 0 insertions, 35 deletions
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h index d062ef99e40..fa8a28cf1b2 100644 --- a/openmp/runtime/src/kmp.h +++ b/openmp/runtime/src/kmp.h @@ -224,7 +224,6 @@ typedef union kmp_team kmp_team_p; typedef union kmp_info kmp_info_p; typedef union kmp_root kmp_root_p; - #ifdef __cplusplus extern "C" { #endif @@ -2333,7 +2332,6 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info { int th_active; // ! sleeping // 32 bits for TCR/TCW - struct cons_header * th_cons; // used for consistency check /* diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c index 3cd404d32ab..9a84533fe3e 100644 --- a/openmp/runtime/src/kmp_runtime.c +++ b/openmp/runtime/src/kmp_runtime.c @@ -54,7 +54,6 @@ char const __kmp_version_omp_api[] = KMP_VERSION_PREFIX "API version: " char const __kmp_version_lock[] = KMP_VERSION_PREFIX "lock type: run time selectable"; #endif /* KMP_DEBUG */ - #define KMP_MIN( x, y ) ( (x) < (y) ? (x) : (y) ) /* ------------------------------------------------------------------------ */ @@ -611,8 +610,6 @@ __kmp_reset_locks_on_process_detach( int gtid_req ) { #ifdef KMP_DEBUG __kmp_reset_lock( &__kmp_stdio_lock ); #endif // KMP_DEBUG - - } BOOL WINAPI @@ -964,7 +961,6 @@ __kmp_reserve_threads( kmp_root_t *root, kmp_team_t *parent_team, new_nthreads = tl_nthreads; } - // // Check if the threads array is large enough, or needs expanding. // @@ -2177,7 +2173,6 @@ __kmp_fork_call( __kmp_release_bootstrap_lock( &__kmp_forkjoin_lock ); - #if USE_ITT_BUILD if ( team->t.t_active_level == 1 // only report frames at level 1 # if OMP_40_ENABLED @@ -2631,7 +2626,6 @@ __kmp_set_num_threads( int new_nth, int gtid ) __kmp_acquire_bootstrap_lock( &__kmp_forkjoin_lock ); - // Release the extra threads we don't need any more. for ( f = new_nth; f < hot_team->t.t_nproc; f++ ) { KMP_DEBUG_ASSERT( hot_team->t.t_threads[f] != NULL ); @@ -2650,7 +2644,6 @@ __kmp_set_num_threads( int new_nth, int gtid ) } #endif - __kmp_release_bootstrap_lock( &__kmp_forkjoin_lock ); // @@ -4194,7 +4187,6 @@ __kmp_allocate_thread( kmp_root_t *root, kmp_team_t *team, int new_tid ) // Don't touch th_active_in_pool or th_active. // The worker thread adjusts those flags as it sleeps/awakens. // - __kmp_thread_pool_nth--; KA_TRACE( 20, ("__kmp_allocate_thread: T#%d using thread T#%d\n", @@ -4385,7 +4377,6 @@ __kmp_allocate_thread( kmp_root_t *root, kmp_team_t *team, int new_tid ) __kmp_create_worker( new_gtid, new_thr, __kmp_stksize ); KF_TRACE( 10, ("__kmp_allocate_thread: after __kmp_create_worker: %p\n", new_thr )); - KA_TRACE( 20, ("__kmp_allocate_thread: T#%d forked T#%d\n", __kmp_get_gtid(), new_gtid )); KMP_MB(); return new_thr; @@ -4956,7 +4947,6 @@ __kmp_allocate_team( kmp_root_t *root, int new_nproc, int max_nproc, team->t.t_size_changed = 1; - #if KMP_NESTED_HOT_TEAMS int avail_threads = hot_teams[level].hot_team_nth; if( new_nproc < avail_threads ) @@ -5307,7 +5297,6 @@ __kmp_free_team( kmp_root_t *root, kmp_team_t *team USE_NESTED_HOT_ARG(kmp_info // Reset pointer to parent team only for non-hot teams. team->t.t_parent = NULL; - /* free the worker threads */ for ( f = 1; f < team->t.t_nproc; ++ f ) { KMP_DEBUG_ASSERT( team->t.t_threads[ f ] ); @@ -5315,7 +5304,6 @@ __kmp_free_team( kmp_root_t *root, kmp_team_t *team USE_NESTED_HOT_ARG(kmp_info team->t.t_threads[ f ] = NULL; } - /* put the team back in the team pool */ /* TODO limit size of team pool, call reap_team if pool too large */ team->t.t_next_pool = (kmp_team_t*) __kmp_team_pool; @@ -5399,7 +5387,6 @@ __kmp_free_thread( kmp_info_t *this_th ) } this_th->th.th_task_state = 0; - /* put thread back on the free pool */ TCW_PTR(this_th->th.th_team, NULL); TCW_PTR(this_th->th.th_root, NULL); @@ -5707,7 +5694,6 @@ __kmp_reap_thread( __kmp_release_64(&flag); }; // if - // Terminate OS thread. __kmp_reap_worker( thread ); @@ -5914,7 +5900,6 @@ __kmp_internal_end(void) TCW_4(__kmp_init_gtid, FALSE); KMP_MB(); /* Flush all pending memory write invalidates. */ - __kmp_cleanup(); #if OMPT_SUPPORT ompt_fini(); diff --git a/openmp/runtime/src/kmp_settings.c b/openmp/runtime/src/kmp_settings.c index af7d7fb238f..11e340cdc72 100644 --- a/openmp/runtime/src/kmp_settings.c +++ b/openmp/runtime/src/kmp_settings.c @@ -3854,7 +3854,6 @@ __kmp_stg_print_gtid_mode( kmp_str_buf_t * buffer, char const * name, void * dat } } // __kmp_stg_print_gtid_mode - // ------------------------------------------------------------------------------------------------- // KMP_NUM_LOCKS_IN_BLOCK // ------------------------------------------------------------------------------------------------- diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c index 432f9192319..8ea6554f859 100644 --- a/openmp/runtime/src/kmp_tasking.c +++ b/openmp/runtime/src/kmp_tasking.c @@ -23,7 +23,6 @@ #include "ompt-specific.h" #endif - /* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */ @@ -2476,7 +2475,6 @@ __kmp_wait_to_unref_task_teams(void) KMP_INIT_YIELD( spins ); - for (;;) { done = TRUE; @@ -2529,8 +2527,6 @@ __kmp_wait_to_unref_task_teams(void) KMP_YIELD( TCR_4(__kmp_nth) > __kmp_avail_proc ); KMP_YIELD_SPIN( spins ); // Yields only if KMP_LIBRARY=throughput } - - } diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c index 0ebd9c4a9b9..703ad6daed0 100644 --- a/openmp/runtime/src/z_Linux_util.c +++ b/openmp/runtime/src/z_Linux_util.c @@ -54,7 +54,6 @@ # include <pthread_np.h> #endif - #include <dirent.h> #include <ctype.h> #include <fcntl.h> @@ -754,7 +753,6 @@ __kmp_launch_worker( void *thr ) return exit_val; } - /* The monitor thread controls all of the threads in the complex */ static void* @@ -1752,8 +1750,6 @@ static inline void __kmp_suspend_template( int th_gtid, C *flag ) KMP_DEBUG_ASSERT( TCR_4(__kmp_thread_pool_active_nth) >= 0 ); } deactivated = TRUE; - - } #if USE_SUSPEND_TIMEOUT @@ -1813,7 +1809,6 @@ static inline void __kmp_suspend_template( int th_gtid, C *flag ) } #endif - status = pthread_mutex_unlock( &th->th.th_suspend_mx.m_mutex ); KMP_CHECK_SYSFAIL( "pthread_mutex_unlock", status ); @@ -1872,7 +1867,6 @@ static inline void __kmp_resume_template( int target_gtid, C *flag ) KF_TRACE( 5, ( "__kmp_resume_template: T#%d exiting, thread T#%d already awake: flag(%p): " "%u => %u\n", gtid, target_gtid, flag->get(), old_spin, *flag->get() ) ); - status = pthread_mutex_unlock( &th->th.th_suspend_mx.m_mutex ); KMP_CHECK_SYSFAIL( "pthread_mutex_unlock", status ); return; @@ -1892,7 +1886,6 @@ static inline void __kmp_resume_template( int target_gtid, C *flag ) } #endif - status = pthread_cond_signal( &th->th.th_suspend_cv.c_cond ); KMP_CHECK_SYSFAIL( "pthread_cond_signal", status ); status = pthread_mutex_unlock( &th->th.th_suspend_mx.m_mutex ); diff --git a/openmp/runtime/src/z_Windows_NT_util.c b/openmp/runtime/src/z_Windows_NT_util.c index 7ac3eaefa1f..e305109e570 100644 --- a/openmp/runtime/src/z_Windows_NT_util.c +++ b/openmp/runtime/src/z_Windows_NT_util.c @@ -228,7 +228,6 @@ __kmp_win32_cond_wait( kmp_win32_cond_t *cv, kmp_win32_mutex_t *mx, kmp_info_t * __kmp_win32_mutex_unlock( &cv->waiters_count_lock_ ); __kmp_win32_mutex_unlock( mx ); - for (;;) { int wait_done; @@ -394,7 +393,6 @@ static inline void __kmp_suspend_template( int th_gtid, C *flag ) } deactivated = TRUE; - __kmp_win32_cond_wait( &th->th.th_suspend_cv, &th->th.th_suspend_mx, 0, 0 ); } else { @@ -420,7 +418,6 @@ static inline void __kmp_suspend_template( int th_gtid, C *flag ) } } - __kmp_win32_mutex_unlock( &th->th.th_suspend_mx ); KF_TRACE( 30, ("__kmp_suspend_template: T#%d exit\n", th_gtid ) ); @@ -481,7 +478,6 @@ static inline void __kmp_resume_template( int target_gtid, C *flag ) KF_TRACE( 5, ( "__kmp_resume_template: T#%d about to wakeup T#%d, reset sleep bit for flag's loc(%p)\n", gtid, target_gtid, flag->get() ) ); - __kmp_win32_cond_signal( &th->th.th_suspend_cv ); __kmp_win32_mutex_unlock( &th->th.th_suspend_mx ); @@ -1141,7 +1137,6 @@ __kmp_elapsed_tick( double *t ) void __kmp_read_system_time( double *delta ) { - if (delta != NULL) { BOOL status; LARGE_INTEGER now; @@ -1211,7 +1206,6 @@ __kmp_launch_worker( void *arg ) return exit_val; } - /* The monitor thread controls all of the threads in the complex */ void * __stdcall |