Moved libroot/posix/kerrno.c to kernel/lib/ where it belongs, and renamed it to kernel_errno.c.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20044 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-02-02 10:53:57 +00:00
parent 550f2171c1
commit a83c8bbffa
3 changed files with 24 additions and 22 deletions

View File

@ -27,7 +27,7 @@ SEARCH_SOURCE += [ FDirName $(posixSources) unistd ] ;
KernelMergeObject kernel_posix.o :
# main
kerrno.c
kernel_errno.c
dirent.c
poll.c
utime.c

View File

@ -0,0 +1,23 @@
/*
* Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "thread.h"
#include <errno.h>
/*!
Kernel space storage for "errno", located in the thread structure
(user "errno" can't be changed from kernel internal POSIX calls)
*/
int *
_errnop(void)
{
struct thread *thread = thread_get_current_thread();
return &thread->kernel_errno;
}

View File

@ -1,21 +0,0 @@
/*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
/* Kernel space storage for "errno", located in the thread structure
* (user "errno" can't be changed from kernel internal POSIX calls)
*/
#include <errno.h>
#include "thread.h"
int *
_errnop(void)
{
struct thread *thread = thread_get_current_thread();
return &thread->kernel_errno;
}