diff options
author | dimitri staessens <[email protected]> | 2017-10-02 07:06:32 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-10-02 07:06:32 +0000 |
commit | b3879c020ebf038a07aed20ee91ea38f21b7bd98 (patch) | |
tree | a0489929634ee7588de3ad77a6a1166ce11508e2 /src/irmd/api_table.h | |
parent | 5e974395fadc5e1922f200855c14ca0538ba50dc (diff) | |
parent | 9405ad97e20686f74c06bcbac9523a8b4f10272e (diff) | |
download | ouroboros-b3879c020ebf038a07aed20ee91ea38f21b7bd98.tar.gz ouroboros-b3879c020ebf038a07aed20ee91ea38f21b7bd98.zip |
Merged in dstaesse/ouroboros/be-tpm-cancel (pull request #621)
lib: Cancel tpm threads instead of marking exit
Diffstat (limited to 'src/irmd/api_table.h')
-rw-r--r-- | src/irmd/api_table.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/irmd/api_table.h b/src/irmd/api_table.h index d2ac7723..1fb2e285 100644 --- a/src/irmd/api_table.h +++ b/src/irmd/api_table.h @@ -23,6 +23,7 @@ #ifndef OUROBOROS_IRMD_API_TABLE_H #define OUROBOROS_IRMD_API_TABLE_H +#include "time.h" #include "utils.h" #include <unistd.h> @@ -45,10 +46,10 @@ struct api_entry { struct reg_entry * re; /* reg_entry for which a flow arrived */ - /* the api will block on this */ + /* The process will block on this */ enum api_state state; - pthread_cond_t state_cond; - pthread_mutex_t state_lock; + pthread_cond_t cond; + pthread_mutex_t lock; }; struct api_entry * api_entry_create(pid_t api, @@ -56,7 +57,8 @@ struct api_entry * api_entry_create(pid_t api, void api_entry_destroy(struct api_entry * e); -int api_entry_sleep(struct api_entry * e); +int api_entry_sleep(struct api_entry * e, + struct timespec * timeo); void api_entry_wake(struct api_entry * e, struct reg_entry * re); |