Zadania rekrutacyjne i ćwiczeniowe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
490 B

#ifndef BLOCKER_H
#define BLOCKER_H
#include <inttypes.h>
typedef int8_t BlockerHandle;
typedef void(*LockBlockerFn)(BlockerHandle);
typedef void(*NotifyBlockerFn)(BlockerHandle);
enum PTB_TIMEOUT_STATUS {PTB_TIMEOUT, PTB_NO_TIMEOUT};
BlockerHandle createBlocker(void);
void lockBlocker(BlockerHandle id);
enum PTB_TIMEOUT_STATUS lockBlockerTimed(BlockerHandle id, uint32_t timeoutMs);
void notifyBlocker(BlockerHandle id);
void freeBlocker(BlockerHandle* id);
#endif // BLOCKER_H