diff options
Diffstat (limited to 'cpukit/libcsupport/include/rtems')
-rw-r--r-- | cpukit/libcsupport/include/rtems/assoc.h | 42 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/error.h | 38 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/libcsupport.h | 43 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 166 |
4 files changed, 0 insertions, 289 deletions
diff --git a/cpukit/libcsupport/include/rtems/assoc.h b/cpukit/libcsupport/include/rtems/assoc.h deleted file mode 100644 index 1982d654ac..0000000000 --- a/cpukit/libcsupport/include/rtems/assoc.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Rtems associativity routines. Mainly used to convert a value from - * one space to another (eg: our errno's to host errno's and v.v) - * - * - * $Id$ - */ - -#ifndef _INCLUDE_ASSOC_H -#define _INCLUDE_ASSOC_H - -typedef struct { - const char *name; - unsigned32 local_value; - unsigned32 remote_value; -} rtems_assoc_t; - -/* - * Flag/marker for optional default value in each table - */ - -#define RTEMS_ASSOC_DEFAULT_NAME "(default)" - -const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *); -const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32); -const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32); - -unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32); -unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32); -unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *); -unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *); -const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32); -const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32); - -unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32); -char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *); -char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *); -unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32); - - -#endif /* ! _INCLUDE_ASSOC_H */ diff --git a/cpukit/libcsupport/include/rtems/error.h b/cpukit/libcsupport/include/rtems/error.h deleted file mode 100644 index a0698afb5d..0000000000 --- a/cpukit/libcsupport/include/rtems/error.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Defines and externs for rtems error reporting - * - * $Id$ - */ - -#ifndef __RTEMS_ERROR_h -#define __RTEMS_ERROR_h - -/* - * rtems_error() and rtems_panic() support - */ - -#define RTEMS_ERROR_ERRNO (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */ -#define RTEMS_ERROR_PANIC (RTEMS_ERROR_ERRNO / 2) /* err fatal; no return */ -#define RTEMS_ERROR_ABORT (RTEMS_ERROR_ERRNO / 4) /* err is fatal; panic */ - -#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \ - RTEMS_ERROR_PANIC) /* all */ - -const char *rtems_status_text(rtems_status_code); -int rtems_error(int error_code, const char *printf_format, ...); -#ifdef __GNUC__ -void rtems_panic(const char *printf_format, ...); -/* - * We should be able to use this attribute but gcc complains that - * rtems_panic does in fact return. :( - * - * __attribute__ ((__noreturn__)); - */ -#else -void rtems_panic(const char *printf_format, ...); -#endif - -extern int rtems_panic_in_progress; - -#endif -/* end of include file */ diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h deleted file mode 100644 index d007784526..0000000000 --- a/cpukit/libcsupport/include/rtems/libcsupport.h +++ /dev/null @@ -1,43 +0,0 @@ -/* libcsupport.h - * - * This include file contains the information regarding the - * RTEMS specific support for the standard C library. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __LIBC_SUPPORT_h -#define __LIBC_SUPPORT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/types.h> - -void RTEMS_Malloc_Initialize( - void *start, - size_t length, - size_t sbrk_amount -); - -extern void malloc_dump(void); -extern void malloc_walk(size_t source, size_t printf_enabled); -extern void libc_init(int reentrant); -extern int host_errno(void); -extern void fix_syscall_errno(void); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h deleted file mode 100644 index dcdda85aec..0000000000 --- a/cpukit/libcsupport/include/rtems/libio.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * General purpose communication channel for RTEMS to allow UNIX/POSIX - * system call behavior on top of RTEMS IO devices. - * - * TODO - * stat(2) - * unlink(2) - * rename(2) - * - * $Id$ - */ - -#ifndef _RTEMS_LIBIO_H -#define _RTEMS_LIBIO_H - -#include <sys/stat.h> - -typedef unsigned32 rtems_libio_offset_t; - -/* - * An open file data structure, indexed by 'fd' - * TODO: - * should really have a separate per/file data structure that this - * points to (eg: size, offset, driver, pathname should be in that) - */ - -typedef struct { - rtems_driver_name_t *driver; - rtems_libio_offset_t size; /* size of file */ - rtems_libio_offset_t offset; /* current offset into the file */ - unsigned32 flags; - char *pathname; /* opened pathname */ - Objects_Id sem; - unsigned32 data0; /* private to "driver" */ - void *data1; /* ... */ -} rtems_libio_t; - - -/* - * param block for read/write - * Note: it must include 'offset' instead of using iop's offset since - * we can have multiple outstanding i/o's on a device. - */ - -typedef struct { - rtems_libio_t *iop; - rtems_libio_offset_t offset; - unsigned8 *buffer; - unsigned32 count; - unsigned32 flags; - unsigned32 bytes_moved; -} rtems_libio_rw_args_t; - -/* - * param block for open/close - */ - -typedef struct { - rtems_libio_t *iop; - unsigned32 flags; - unsigned32 mode; -} rtems_libio_open_close_args_t; - -/* - * param block for ioctl - */ - -typedef struct { - rtems_libio_t *iop; - unsigned32 command; - void *buffer; - unsigned32 ioctl_return; -} rtems_libio_ioctl_args_t; - - -/* - * Values for 'flag' - */ - -#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */ -#define LIBIO_FLAGS_READ 0x0002 /* reading */ -#define LIBIO_FLAGS_WRITE 0x0004 /* writing */ -#define LIBIO_FLAGS_LINE_BUFFERED 0x0008 /* line buffered io (^h, ^u, etc) */ -#define LIBIO_FLAGS_OPEN 0x0100 /* device is open */ -#define LIBIO_FLAGS_APPEND 0x0200 /* all writes append */ -#define LIBIO_FLAGS_CREATE 0x0400 /* create file */ - -#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE) - -void rtems_libio_init(void); - -int __rtems_open(const char *pathname, unsigned32 flag, unsigned32 mode); -int __rtems_close(int fd); -int __rtems_read(int fd, void *buffer, unsigned32 count); -int __rtems_write(int fd, const void *buffer, unsigned32 count); -int __rtems_ioctl(int fd, unsigned32 command, void *buffer); -int __rtems_lseek(int fd, rtems_libio_offset_t offset, int whence); -int __rtems_fstat(int _fd, struct stat* _sbuf); - -/* - * External I/O handlers - */ -typedef struct { - int (*open)(const char *pathname, unsigned32 flag, unsigned32 mode); - int (*close)(int fd); - int (*read)(int fd, void *buffer, unsigned32 count); - int (*write)(int fd, const void *buffer, unsigned32 count); - int (*ioctl)(int fd, unsigned32 command, void *buffer); - int (*lseek)(int fd, rtems_libio_offset_t offset, int whence); -} rtems_libio_handler_t; - -void rtems_register_libio_handler(int handler_flag, - const rtems_libio_handler_t *handler); - -#define RTEMS_FILE_DESCRIPTOR_TYPE_FILE 0x0000 -#define RTEMS_FILE_DESCRIPTOR_TYPE_SOCKET 0x1000 -#define rtems_make_file_descriptor(fd,flags) ((fd)|(flags)) -#define rtems_file_descriptor_base(fd) ((fd) & 0x0FFF) -#define rtems_file_descriptor_type(fd) ((fd) & 0xF000) -#define rtems_file_descriptor_type_index(fd) ((((fd) & 0xF000) >> 12) - 1) - -/* - * IOCTL values - */ - -#define RTEMS_IO_GET_ATTRIBUTES 1 -#define RTEMS_IO_SET_ATTRIBUTES 2 -#define RTEMS_IO_TCDRAIN 3 - -/* - * Callbacks from TERMIOS routines to device-dependent code - */ -#include <termios.h> -typedef struct rtems_termios_callbacks { - int (*firstOpen)(int major, int minor, void *arg); - int (*lastClose)(int major, int minor, void *arg); - int (*pollRead)(int minor); - int (*write)(int minor, const char *buf, int len); - int (*setAttributes)(int minor, const struct termios *t); - int (*stopRemoteTx)(int minor); - int (*startRemoteTx)(int minor); - int outputUsesInterrupts; -} rtems_termios_callbacks; - -/* - * Device-independent TERMIOS routines - */ -void rtems_termios_initialize (void); -rtems_status_code rtems_termios_open ( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg, - const rtems_termios_callbacks *callbacks - ); -rtems_status_code rtems_termios_close (void *arg); -rtems_status_code rtems_termios_read (void *arg); -rtems_status_code rtems_termios_write (void *arg); -rtems_status_code rtems_termios_ioctl (void *arg); -int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len); -int rtems_termios_dequeue_characters (void *ttyp, int len); -void rtems_termios_reserve_resources( - rtems_configuration_table *configuration, - rtems_unsigned32 number_of_devices -); - -#endif /* _RTEMS_LIBIO_H */ |