aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/errno.h
blob: 527214ef1d92ff0f3df2c5accfc993f2a0a8867d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Copyright (c) 2015, Linaro Limited
 * All rights reserved.
 *
 * SPDX-License-Identifier:	BSD-3-Clause
 */

/**
 * @file
 *
 * ODP errno API
 */

#ifndef ODP_ERRNO_H_
#define ODP_ERRNO_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @addtogroup odp_ver_abt_log_dbg
 *  @{
 */

/**
* Return latest ODP errno
*
* @return ODP errno
* @retval 0 No error
*/
int odp_errno(void);

/**
* Set ODP errno to zero
*/
void odp_errno_zero(void);

/**
* Print ODP errno
*
* Interprets the value of ODP errno as an error message, and prints it,
* optionally preceding it with the custom message specified in str.
*
* @param str NULL, or pointer to the string to be appended
*/
void odp_errno_print(const char *str);

/**
* Error message string
*
* Interprets the value of ODP errno, generating a string with a
* message that describes the error.
* It uses the system definition of errno.
*
* @param errnum	Error code
*
* @retval Pointer to the string
*/
const char *odp_errno_str(int errnum);

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif