summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libcsupport
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
commit3a4ae6c210bcc37754767966f1128ae23c77b6af (patch)
tree8804983e5b92bec788d548df13db7513118d351d /c/src/exec/libcsupport
parentnew file -- split from inlines (diff)
downloadrtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests modified to use this. All gvar.h and conftbl.h files removed from test directories. Configuration parameter maximum_devices added. Core semaphore and mutex handlers added and RTEMS API Semaphore Manager updated to reflect this. Initialization sequence changed to invoke API specific initialization routines. Initialization tasks table now owned by RTEMS Tasks Manager. Added user extension for post-switch. Utilized user extensions to implement API specific functionality like signal dispatching. Added extensions to the System Initialization Thread so that an API can register a function to be invoked while the system is being initialized. These are largely equivalent to the pre-driver and post-driver hooks. Added the Modules file oar-go32_p5, modified oar-go32, and modified the file make/custom/go32.cfg to look at an environment varable which determines what CPU model is being used. All BSPs updated to reflect named devices and clock driver's IOCTL used by the Shared Memory Driver. Also merged clock isr into main file and removed ckisr.c where possible. Updated spsize to reflect new and moved variables. Makefiles for the executive source and include files updated to show break down of files into Core, RTEMS API, and Neither. Header and inline files installed into subdirectory based on whether logically in the Core or a part of the RTEMS API.
Diffstat (limited to 'c/src/exec/libcsupport')
-rw-r--r--c/src/exec/libcsupport/include/console.h37
-rw-r--r--c/src/exec/libcsupport/src/error.c4
-rw-r--r--c/src/exec/libcsupport/src/libio.c3
-rw-r--r--c/src/exec/libcsupport/src/newlibc.c11
4 files changed, 44 insertions, 11 deletions
diff --git a/c/src/exec/libcsupport/include/console.h b/c/src/exec/libcsupport/include/console.h
index d102c6a1b1..02196de7a9 100644
--- a/c/src/exec/libcsupport/include/console.h
+++ b/c/src/exec/libcsupport/include/console.h
@@ -22,14 +22,43 @@ extern "C" {
#endif
#define CONSOLE_DRIVER_TABLE_ENTRY \
- { console_initialize, NULL, NULL, NULL, NULL, NULL }
+ { console_initialize, console_open, console_close, \
+ console_read, console_write, console_control }
rtems_device_driver console_initialize(
rtems_device_major_number,
rtems_device_minor_number,
- void *,
- rtems_id,
- rtems_unsigned32 *
+ void *
+);
+
+rtems_device_driver console_open(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver console_close(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver console_read(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver console_write(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver console_control(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
);
#ifdef __cplusplus
diff --git a/c/src/exec/libcsupport/src/error.c b/c/src/exec/libcsupport/src/error.c
index 8cf46f0565..cfe1858e08 100644
--- a/c/src/exec/libcsupport/src/error.c
+++ b/c/src/exec/libcsupport/src/error.c
@@ -91,8 +91,8 @@ rtems_assoc_t rtems_status_assoc[] = {
{ "not owner of resource", RTEMS_NOT_OWNER_OF_RESOURCE , },
{ "directive not implemented", RTEMS_NOT_IMPLEMENTED, },
{ "RTEMS inconsistency detected", RTEMS_INTERNAL_ERROR, },
- { "internal multiprocessing only", RTEMS_PROXY_BLOCKING, },
{ "could not get enough memory", RTEMS_NO_MEMORY, },
+ { "internal multiprocessing only", THREAD_STATUS_PROXY_BLOCKING, },
{ 0, 0, 0 },
};
@@ -134,7 +134,7 @@ static int rtems_verror(
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
- if (_Configuration_Is_multiprocessing())
+ if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%d] ", _Configuration_MP_table->node);
if (rtems_progname && *rtems_progname)
diff --git a/c/src/exec/libcsupport/src/libio.c b/c/src/exec/libcsupport/src/libio.c
index f2046501ce..38e0f83bac 100644
--- a/c/src/exec/libcsupport/src/libio.c
+++ b/c/src/exec/libcsupport/src/libio.c
@@ -14,8 +14,11 @@
#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
#include <fcntl.h> /* O_RDONLY, et.al. */
+#include <sys/fcntl.h> /* O_RDONLY, et.al. */
#if defined(solaris2)
#define O_NDELAY O_NONBLOCK
+#elif defined(RTEMS_NEWLIB)
+#define O_NDELAY _FNBIO
#endif
#include <errno.h>
#include <string.h> /* strcmp */
diff --git a/c/src/exec/libcsupport/src/newlibc.c b/c/src/exec/libcsupport/src/newlibc.c
index 4493b473da..e041668375 100644
--- a/c/src/exec/libcsupport/src/newlibc.c
+++ b/c/src/exec/libcsupport/src/newlibc.c
@@ -80,11 +80,12 @@ libc_wrapup(void)
}
-rtems_extension
+rtems_boolean
libc_create_hook(rtems_tcb *current_task,
rtems_tcb *creating_task)
{
MY_task_set_note(creating_task, LIBC_NOTEPAD, 0);
+ return TRUE;
}
/*
@@ -231,10 +232,10 @@ libc_init(int reentrant)
{
memset(&libc_extension, 0, sizeof(libc_extension));
- libc_extension.rtems_task_create = libc_create_hook;
- libc_extension.rtems_task_start = libc_start_hook;
- libc_extension.task_switch = libc_switch_hook;
- libc_extension.rtems_task_delete = libc_delete_hook;
+ libc_extension.thread_create = libc_create_hook;
+ libc_extension.thread_start = libc_start_hook;
+ libc_extension.thread_switch = libc_switch_hook;
+ libc_extension.thread_delete = libc_delete_hook;
rc = rtems_extension_create(rtems_build_name('L', 'I', 'B', 'C'),
&libc_extension, &extension_id);