]> git.proxmox.com Git - ceph.git/blame - ceph/src/civetweb/docs/api/mg_start_thread.md
buildsys: switch source download to quincy
[ceph.git] / ceph / src / civetweb / docs / api / mg_start_thread.md
CommitLineData
11fdf7f2
TL
1# Civetweb API Reference
2
3### `mg_start_thread( func, cbdata );`
4
5### Parameters
6
7| Parameter | Type | Description |
8| :--- | :--- | :--- |
9|**`func`**|`mg_thread_func_t`|Function to start as a separate thread|
10|**`cbdata`**|`void *`|User defined data to be passed to the thread as parameter|
11
12`void mg_thread_func_t( void *cbdata );`
13
14### Return Value
15
16| Type | Description |
17| :--- | :--- |
18|`int`|Success or error code|
19
20### Description
21
22The function `mg_start_thread()` is a convenience function to create a detached thread. The function returns **0** when successful and another value if an error occured. A pointer to user supplied data can be passed which is then passed further on to the thread function as parameter.
23
24### See Also
25
26* [`mg_start();`](mg_start.md)