mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 04:09:26 +08:00
Added an RTEMS specific version of routines needed from copyinout.c
This commit is contained in:
parent
fd8fe3fdb9
commit
fdd321cb3e
1
Makefile
1
Makefile
@ -56,6 +56,7 @@ C_FILES += rtemsbsd/src/rtems-bsd-timeout.c
|
||||
C_FILES += rtemsbsd/src/rtems-bsd-timesupport.c
|
||||
C_FILES += rtemsbsd/src/rtems-bsd-newproc.c
|
||||
C_FILES += rtemsbsd/src/rtems-bsd-vm_glue.c
|
||||
C_FILES += rtemsbsd/src/rtems-bsd-copyinout.c
|
||||
C_FILES += freebsd/kern/subr_eventhandler.c
|
||||
C_FILES += freebsd/kern/kern_subr.c
|
||||
C_FILES += freebsd/kern/kern_tc.c
|
||||
|
@ -551,6 +551,7 @@ rtems.addRTEMSSourceFiles(
|
||||
'src/rtems-bsd-timesupport.c',
|
||||
'src/rtems-bsd-newproc.c',
|
||||
'src/rtems-bsd-vm_glue.c',
|
||||
'src/rtems-bsd-copyinout.c',
|
||||
]
|
||||
)
|
||||
rtems.addEmptyHeaderFiles(
|
||||
|
31
rtemsbsd/src/rtems-bsd-copyinout.c
Normal file
31
rtemsbsd/src/rtems-bsd-copyinout.c
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup rtems_bsd_rtems
|
||||
*
|
||||
* @brief This file contains the RTEMS implementation of the bsd functions
|
||||
* from the copyinout.c file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <freebsd/machine/rtems-bsd-config.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <rtems.h>
|
||||
|
||||
int
|
||||
copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done)
|
||||
{
|
||||
memcpy(kaddr, udaddr, len);
|
||||
*done = len;
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user