OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [syscall/] [errno.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
/* errno.c -- functions for getting and setting errno
2
 
3
   Copyright 2010 The Go Authors. All rights reserved.
4
   Use of this source code is governed by a BSD-style
5
   license that can be found in the LICENSE file.  */
6
 
7
#include <errno.h>
8
#include <stdint.h>
9
 
10
/* errno is typically a macro. These functions set
11
   and get errno specific to the libc being used.  */
12
 
13
uintptr_t GetErrno() asm ("libgo_syscall.syscall.GetErrno");
14
void SetErrno(uintptr_t) asm ("libgo_syscall.syscall.SetErrno");
15
 
16
uintptr_t
17
GetErrno()
18
{
19
  return (uintptr_t) errno;
20
}
21
 
22
void
23
SetErrno(uintptr_t value)
24
{
25
  errno = (int) value;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.