# session_next

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L410
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-session_next/

```c
int session_next(struct session *s, int alert)
```

## Parameters

- `s` (`struct session *`)
- `alert` (`int`)

## Called by

- [`cmd_select_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-select-window.c#L108)
- [`session_detach`](/en/tmux/3.2a/reference/c-function-session_detach/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L354)
- [`session_group_synchronize1`](/en/tmux/3.2a/reference/c-function-session-c-session_group_synchronize1/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L652)

## Calls

- [`session_next_alert`](/en/tmux/3.2a/reference/c-function-session-c-session_next_alert/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L419)
- [`session_set_current`](/en/tmux/3.2a/reference/c-function-session_set_current/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L425)
- [`winlink_next`](/en/tmux/3.2a/reference/c-function-winlink_next/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L417)

## Referenced by

- [`session_new`](/en/tmux/3.2a/reference/c-function-session_new/) (function)

## Referenced declarations

- [`session.curw`](/en/tmux/3.2a/reference/c-struct-session-curw/) (attribute)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
- [`session.windows`](/en/tmux/3.2a/reference/c-struct-session-windows/) (attribute)
