Skip to content

Commit

Permalink
Add void argument to preemption callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Sep 13, 2023
1 parent 2c6cd83 commit cd74083
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/scs_threaded.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ static bool checkCountdownClocks(FMIInstance *S);

void cb_clockUpdate(fmi3InstanceEnvironment instanceEnvironment);

void cb_lockPreemption();
void cb_lockPreemption(void);

void cb_unlockPreemption();
void cb_unlockPreemption(void);

void logEvent(const char* message, ...) {

Expand Down Expand Up @@ -380,15 +380,15 @@ void cb_clockUpdate(fmi3InstanceEnvironment instanceEnvironment) {
* Callback function to grab a lock in order to avoid preemption in a critical section
* Works on a globally defined variable initialized by the importer
*/
void cb_lockPreemption() {
void cb_lockPreemption(void) {
GlobalLock(globalLockVar);
}
/*
* cb_unlockPreemption()
* Callback function to release a lock
* Works on a globally defined variable initialized by the importer
*/
void cb_unlockPreemption() {
void cb_unlockPreemption(void) {
GlobalUnlock(globalLockVar);
}

Expand Down

0 comments on commit cd74083

Please sign in to comment.