WIP: add signal_fn for custom scheduler definition #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge; this is a prototype for discussion/evaluation.
This pull request adds a new user-definable function pointer to user defined schedulers called signal(). If a scheduler associated with a pool defines this function, then it will be invoked when new work items are added to the pool.
The purpose of this feature is to allow idle schedulers to be awoken when new work arrives. It's use is demonstrated in a branch of the abt-snoozer scheduler here: https://xgitlab.cels.anl.gov/sds/abt-snoozer/tree/dev-sched-signal. The original (see origin/master) version of abt-snoozer defines its own pool that stacks on top of the default pool so that it can intercept the push() function for this purpose, which is a little awkward and exposes us to #26.
The patch does not yet correctly protect data structures in the modified ABTI_pool_retain() and ABTI_pool_release() functions.
The new variation of abt-snoozer is also incomplete; it could be simplified considerably now that it doesn't have to be organized to link a user defined scheduler and user defined pool via their data pointers.