File: errno.h

package info (click to toggle)
rtlinux 2.0rel-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,068 kB
  • ctags: 1,178
  • sloc: ansic: 7,169; makefile: 779; sh: 89
file content (17 lines) | stat: -rw-r--r-- 350 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef __RTL_ERRNO_H__
#define __RTL_ERRNO_H__

#include <rtl_conf.h>
#include <asm/errno.h>

#ifdef CONFIG_RTL_ERRNO_THREADSAFE
#include <rtl_sched.h>
#define errno (RTL_CURRENT->errno_val)
#else
extern int errno;
#endif

#define __set_errno(x) do { errno = (x); } while (0)
#define __reterror(x, y) do { errno = (x); return y; } while (0)

#endif