# cmd_wait_for_add

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

```c
static struct wait_channel * cmd_wait_for_add(const char *)
```

## Parameters

- `name` (`const char *`)

## Called by

- [`cmd_wait_for_lock`](/en/tmux/latest/reference/c-function-cmd-wait-for-c-cmd_wait_for_lock/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L207)
- [`cmd_wait_for_signal`](/en/tmux/latest/reference/c-function-cmd-wait-for-c-cmd_wait_for_signal/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L146)
- [`cmd_wait_for_wait`](/en/tmux/latest/reference/c-function-cmd-wait-for-c-cmd_wait_for_wait/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L179)

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L99)
- [`xmalloc`](/en/tmux/latest/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L88)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L89)

## Referenced declarations

- [`wait_channel.locked`](/en/tmux/latest/reference/c-struct-wait_channel-locked/) (attribute)
- [`wait_channel.lockers`](/en/tmux/latest/reference/c-struct-wait_channel-lockers/) (attribute)
- [`wait_channel.name`](/en/tmux/latest/reference/c-struct-wait_channel-name/) (attribute)
- [`wait_channel`](/en/tmux/latest/reference/c-struct-wait_channel/) (struct)
- [`wait_channel.waiters`](/en/tmux/latest/reference/c-struct-wait_channel-waiters/) (attribute)
- [`wait_channel.woken`](/en/tmux/latest/reference/c-struct-wait_channel-woken/) (attribute)
