# [−][src]Function mynewt::kernel::os::os_task_info_get_next

    pub unsafe extern "C" fn os_task_info_get_next(
        arg1: *const os_task,
        arg2: *mut os_task_info
    ) -> *mut os_task

Iterate through tasks, and return the following information about them:

- Priority
- Task ID
- State (READY, SLEEP)
- Total Stack Usage
- Stack Size
- Context Switch Count
- Runtime
- Last & Next Sanity checkin
- Task Name

To get the first task in the list, call os_task_info_get_next() with a NULL pointer in the prev argument, and os_task_info_get_next() will return a pointer to the task structure, and fill out the os_task_info structure pointed to by oti.

To get the next task in the list, provide the task structure returned by the previous call to os_task_info_get_next(), and os_task_info_get_next() will fill out the task structure pointed to by oti again, and return the next task in the list.

- `prev`: The previous task returned by os_task_info_get_next(), or NULL to begin iteration.
- `oti`: The OS task info structure to fill out.

Return: A pointer to the OS task that has been read, or NULL when finished iterating through all tasks.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)