Skip to content

Commit

Permalink
Make sure atomic's are initialized (for non-gcc atomic).
Browse files Browse the repository at this point in the history
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
  • Loading branch information
asalkeld committed Sep 11, 2012
1 parent d54e8b1 commit aedcb97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ipc_us.c
Expand Up @@ -467,6 +467,8 @@ qb_ipcc_us_connect(struct qb_ipcc_connection *c,
int32_t fd_hdr;
char * shm_ptr;

qb_atomic_init();

c->needs_sock_for_poll = QB_FALSE;
c->funcs.send = qb_ipc_us_send;
c->funcs.sendv = qb_ipc_us_sendv;
Expand Down Expand Up @@ -1110,4 +1112,6 @@ qb_ipcs_us_init(struct qb_ipcs_service *s)
s->funcs.q_len_get = qb_ipc_us_q_len_get;

s->needs_sock_for_poll = QB_FALSE;

qb_atomic_init();
}
1 change: 1 addition & 0 deletions lib/ringbuffer.c
Expand Up @@ -164,6 +164,7 @@ qb_rb_open(const char *name, size_t size, uint32_t flags,
qb_util_log(LOG_ERR, "couldn't create mmap for header");
goto cleanup_hdr;
}
qb_atomic_init();

rb->flags = flags;

Expand Down

0 comments on commit aedcb97

Please sign in to comment.