Skip to content

Commit

Permalink
Fix condition static initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Jan 1, 2019
1 parent 061dd84 commit 6406cf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ dword_t sys_sigaltstack(addr_t ss_addr, addr_t old_ss_addr) {
return 0;
}

static cond_t pause_cond = PTHREAD_COND_INITIALIZER;
static cond_t pause_cond = COND_INITIALIZER;

int_t sys_rt_sigsuspend(addr_t mask_addr, uint_t size) {
if (size != sizeof(sigset_t_))
Expand Down
1 change: 1 addition & 0 deletions util/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ typedef struct {
typedef struct {
pthread_cond_t cond;
} cond_t;
#define COND_INITIALIZER {PTHREAD_COND_INITIALIZER}

// Must call before using the condition
void cond_init(cond_t *cond);
Expand Down

0 comments on commit 6406cf3

Please sign in to comment.