apps:Fix atomic_flag error for clang compilation

Change atomic_int to atomic_flag to solve the error
reported when compiling with clang.

Signed-off-by: Yunfei Li <liyunfei33@huawei.com>
This commit is contained in:
Yunfei Li
2023-03-14 19:00:49 +01:00
committed by Arnaud Pouliquen
parent 246540f3d6
commit d4145ecd75
2 changed files with 4 additions and 3 deletions
@@ -36,7 +36,7 @@
static struct rpmsg_rpc_clt *rpmsg_default_rpc;
static int file_d, bytes_written, bytes_read;
static struct polling poll;
static atomic_int wait_resp;
static atomic_flag wait_resp;
static void rpmsg_rpc_shutdown(struct rpmsg_rpc_clt *rpc)
{
@@ -464,7 +464,8 @@ int app(struct rpmsg_device *rdev, void *priv)
/* redirect I/Os */
LPRINTF("Initializating I/Os redirection...\r\n");
table_len = (int)sizeof(rpc_table) / sizeof(struct rpmsg_rpc_services);
atomic_init(&wait_resp, 1);
wait_resp = (atomic_flag)ATOMIC_FLAG_INIT;
atomic_flag_test_and_set(&wait_resp);
ret = rpmsg_rpc_client_init(&rpc, rdev,
rpmsg_rpc_shutdown, rpc_table, table_len);
@@ -51,7 +51,7 @@ struct vring_ipi_info {
/* Socket file path */
const char *path;
int fd;
atomic_int sync;
atomic_flag sync;
};
struct remoteproc_priv {