Changeset 132ab5d1 in mainline for abi/include/_bits/errno.h


Ignore:
Timestamp:
2018-01-30T03:20:45Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a6cc679
Parents:
8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge commit '6a5d05bd2551e64111bea4f9332dd7448c26ce84' into forwardport

Separate return value from error code in gen_irq_code*().

File:
1 moved

Legend:

Unmodified
Added
Removed
  • abi/include/_bits/errno.h

    r8bfb163 r132ab5d1  
    11/*
    2  * Copyright (c) 2010 Lenka Trochtova
     2 * Copyright (c) 2017 CZ.NIC, z.s.p.o.
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libdrv
     29/* Authors:
     30 *      Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com>
     31 */
     32
     33/** @addtogroup bits
    3034 * @{
    3135 */
     
    3337 */
    3438
    35 #ifndef LIBDRV_REMOTE_CHAR_DEV_H_
    36 #define LIBDRV_REMOTE_CHAR_DEV_H_
     39#ifndef _BITS_ERRNO_H_
     40#define _BITS_ERRNO_H_
    3741
    38 extern remote_iface_t remote_char_dev_iface;
     42#ifdef __OPAQUE_ERRNO__
     43#include <_bits/opaque_handle.h>
     44
     45opaque_handle(errno_t);
     46typedef errno_t sys_errno_t;
     47#define __errno_t(val) ((errno_t) val)
     48
     49#else
     50
     51#include <_bits/native.h>
     52
     53/**
     54 * The type of <errno.h> constants. Normally, this is an alias for `int`,
     55 * but we support an alternative definition that allows us to verify
     56 * integrity of error handling without using external tools.
     57 */
     58typedef int errno_t;
     59
     60/**
     61 * Same as `errno_t`, except represented as `sysarg_t`. Used in kernel in
     62 * places where error number is always passed, but the type must be `sysarg_t`.
     63 */
     64typedef sysarg_t sys_errno_t;
     65
     66/**
     67 * A C++-style "cast" to `errno_t`.
     68 * Used in <abi/errno.h> to define error constants. Normally, it doesn't do
     69 * anything at all.
     70 */
     71#define __errno_t(val) val
    3972
    4073#endif
    4174
    42 /**
    43  * @}
    44  */
     75#endif
Note: See TracChangeset for help on using the changeset viewer.