File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,9 @@ int qthread_spawn(qthread_f f,
333
333
/* This is a function to move a thread from one shepherd to another. */
334
334
int qthread_migrate_to (const qthread_shepherd_id_t shepherd );
335
335
336
+ /* Resets the default shepherd spawn order for tasks that use NO_SHEPHERD */
337
+ void qthread_reset_target_shep (void );
338
+
336
339
/* This function sets the debug level if debugging has been enabled */
337
340
int qthread_debuglevel (int );
338
341
Original file line number Diff line number Diff line change @@ -3000,6 +3000,19 @@ int API_FUNC qthread_migrate_to(const qthread_shepherd_id_t shepherd)
3000
3000
}
3001
3001
} /*}}} */
3002
3002
3003
+ void API_FUNC qthread_reset_target_shep (void ) {
3004
+ assert (qthread_library_initialized );
3005
+ qthread_t * me = qthread_internal_self ();
3006
+
3007
+ if (me ) {
3008
+ assert (me -> rdata );
3009
+ me -> rdata -> shepherd_ptr -> sched_shepherd = 0 ;
3010
+ } else {
3011
+ qlib -> sched_shepherd = 0 ;
3012
+ MACHINE_FENCE ;
3013
+ }
3014
+ }
3015
+
3003
3016
3004
3017
/* These are just accessor functions */
3005
3018
unsigned int API_FUNC qthread_id (void )
You can’t perform that action at this time.
0 commit comments