Skip to content

Commit

Permalink
lib:Fix atomic_flag error for clang compilation
Browse files Browse the repository at this point in the history
Change atomic_int to atomic_flag to solve the error
reported when compiling with clang.

Signed-off-by: Yunfei Li <liyunfei33@huawei.com>
  • Loading branch information
mzyx-hnu authored and arnopo committed Mar 14, 2023
1 parent d4145ec commit 1b97548
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/include/openamp/rpmsg_retarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct rpmsg_rpc_syscall {
struct rpmsg_rpc_data {
struct rpmsg_endpoint ept;
int ept_destroyed;
atomic_int nacked;
atomic_flag nacked;
void *respbuf;
size_t respbuf_len;
rpmsg_rpc_poll poll;
Expand Down
3 changes: 2 additions & 1 deletion lib/proxy/rpmsg_retarget.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ int rpmsg_rpc_init(struct rpmsg_rpc_data *rpc,
rpc->ept_destroyed = 0;
rpc->respbuf = NULL;
rpc->respbuf_len = 0;
atomic_init(&rpc->nacked, 1);
rpc->nacked = (atomic_flag)ATOMIC_FLAG_INIT;
atomic_flag_test_and_set(&rpc->nacked);
ret = rpmsg_create_ept(&rpc->ept, rdev,
ept_name, ept_addr, ept_raddr,
rpmsg_rpc_ept_cb, rpmsg_service_unbind);
Expand Down

0 comments on commit 1b97548

Please sign in to comment.