# window_tree_cmp_session

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L205
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_cmp_session/

```c
static int window_tree_cmp_session(const void *a0, const void *b0)
```

## Parameters

- `a0` (`const void *`)
- `b0` (`const void *`)

## Referenced by

- [`window_tree_build`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_build/) (function)

## Referenced declarations

- [`session.activity_time`](/en/tmux/3.2a/reference/c-struct-session-activity_time/) (attribute)
- [`mode_tree_sort_criteria.field`](/en/tmux/3.2a/reference/c-struct-mode_tree_sort_criteria-field/) (attribute)
- [`session.id`](/en/tmux/3.2a/reference/c-struct-session-id/) (attribute)
- [`session.name`](/en/tmux/3.2a/reference/c-struct-session-name/) (attribute)
- [`mode_tree_sort_criteria.reversed`](/en/tmux/3.2a/reference/c-struct-mode_tree_sort_criteria-reversed/) (attribute)
- [`timercmp`](/en/tmux/3.2a/reference/c-define-compat-h-timercmp/) (constant)
- [`WINDOW_TREE_BY_INDEX`](/en/tmux/3.2a/reference/c-enum-window_tree_sort_type-window_tree_by_index/) (constant)
- [`WINDOW_TREE_BY_NAME`](/en/tmux/3.2a/reference/c-enum-window_tree_sort_type-window_tree_by_name/) (constant)
- [`WINDOW_TREE_BY_TIME`](/en/tmux/3.2a/reference/c-enum-window_tree_sort_type-window_tree_by_time/) (constant)
- [`window_tree_sort`](/en/tmux/3.2a/reference/c-variable-window-tree-c-window_tree_sort/) (attribute)
