Lines Matching refs:cmd

242   sock_cmd_t cmd = {CMD_ADD_FD, fd, type, flags, user_id};  in btsock_thread_add_fd()  local
246 OSI_NO_INTR(ret = send(ts[h].cmd_fdw, &cmd, sizeof(cmd), 0)); in btsock_thread_add_fd()
248 return ret == sizeof(cmd); in btsock_thread_add_fd()
261 sock_cmd_t cmd = {CMD_REMOVE_FD, fd, 0, 0, 0}; in btsock_thread_remove_fd_and_close() local
264 OSI_NO_INTR(ret = send(ts[thread_handle].cmd_fdw, &cmd, sizeof(cmd), 0)); in btsock_thread_remove_fd_and_close()
266 return ret == sizeof(cmd); in btsock_thread_remove_fd_and_close()
280 sock_cmd_t cmd = {CMD_USER_PRIVATE, 0, type, size, user_id}; in btsock_thread_post_cmd() local
282 sock_cmd_t* cmd_send = &cmd; in btsock_thread_post_cmd()
283 int size_send = sizeof(cmd); in btsock_thread_post_cmd()
285 size_send = sizeof(cmd) + size; in btsock_thread_post_cmd()
288 *cmd_send = cmd; in btsock_thread_post_cmd()
311 sock_cmd_t cmd = {CMD_WAKEUP, 0, 0, 0, 0}; in btsock_thread_wakeup() local
314 OSI_NO_INTR(ret = send(ts[h].cmd_fdw, &cmd, sizeof(cmd), 0)); in btsock_thread_wakeup()
316 return ret == sizeof(cmd); in btsock_thread_wakeup()
327 sock_cmd_t cmd = {CMD_EXIT, 0, 0, 0, 0}; in btsock_thread_exit() local
330 OSI_NO_INTR(ret = send(ts[h].cmd_fdw, &cmd, sizeof(cmd), 0)); in btsock_thread_exit()
332 if (ret == sizeof(cmd)) { in btsock_thread_exit()
413 sock_cmd_t cmd = {-1, 0, 0, 0, 0}; in process_cmd_sock() local
417 OSI_NO_INTR(ret = recv(fd, &cmd, sizeof(cmd), MSG_WAITALL)); in process_cmd_sock()
419 if (ret != sizeof(cmd)) { in process_cmd_sock()
423 APPL_TRACE_DEBUG("cmd.id:%d", cmd.id); in process_cmd_sock()
424 switch (cmd.id) { in process_cmd_sock()
426 add_poll(h, cmd.fd, cmd.type, cmd.flags, cmd.user_id); in process_cmd_sock()
431 if (poll_slot->pfd.fd == cmd.fd) { in process_cmd_sock()
436 close(cmd.fd); in process_cmd_sock()
443 ts[h].cmd_callback(fd, cmd.type, cmd.flags, cmd.user_id); in process_cmd_sock()
448 APPL_TRACE_DEBUG("unknown cmd: %d", cmd.id); in process_cmd_sock()