# cmd_wait_for_wait

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L167
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-cmd-wait-for-c-cmd_wait_for_wait/

```c
static enum cmd_retval cmd_wait_for_wait(struct cmdq_item *, const char *, struct wait_channel *)
```

## Parameters

- `item` (`struct cmdq_item *`)
- `name` (`const char *`)
- `wc` (`struct wait_channel *`)

## Called by

- [`cmd_wait_for_exec`](/en/tmux/3.7c/reference/c-function-cmd-wait-for-c-cmd_wait_for_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L136)

## Calls

- [`cmd_wait_for_add`](/en/tmux/3.7c/reference/c-function-cmd-wait-for-c-cmd_wait_for_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L179)
- [`cmd_wait_for_remove`](/en/tmux/3.7c/reference/c-function-cmd-wait-for-c-cmd_wait_for_remove/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L183)
- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L174)
- [`cmdq_get_client`](/en/tmux/3.7c/reference/c-function-cmdq_get_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L170)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L182)
- [`xcalloc`](/en/tmux/3.7c/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L188)

## Referenced declarations

- [`CMD_RETURN_ERROR`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`CMD_RETURN_WAIT`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_wait/) (constant)
- [`cmd_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`wait_item.entry`](/en/tmux/3.7c/reference/c-struct-wait_item-entry/) (attribute)
- [`wait_item.item`](/en/tmux/3.7c/reference/c-struct-wait_item-item/) (attribute)
- [`wait_channel.name`](/en/tmux/3.7c/reference/c-struct-wait_channel-name/) (attribute)
- [`wait_channel`](/en/tmux/3.7c/reference/c-struct-wait_channel/) (struct)
- [`wait_channel.waiters`](/en/tmux/3.7c/reference/c-struct-wait_channel-waiters/) (attribute)
- [`wait_channel.woken`](/en/tmux/3.7c/reference/c-struct-wait_channel-woken/) (attribute)
