summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r--cpukit/libcsupport/include/console.h37
-rw-r--r--cpukit/libcsupport/src/error.c4
-rw-r--r--cpukit/libcsupport/src/libio.c3
-rw-r--r--cpukit/libcsupport/src/newlibc.c11
4 files changed, 44 insertions, 11 deletions
diff --git a/cpukit/libcsupport/include/console.h b/cpukit/libcsupport/include/console.h
index d102c6a1b1..02196de7a9 100644
--- a/cpukit/libcsupport/include/console.h
+++ b/cpukit/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/cpukit/libcsupport/src/error.c b/cpukit/libcsupport/src/error.c
index 8cf46f0565..cfe1858e08 100644
--- a/cpukit/libcsupport/src/error.c
+++ b/cpukit/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/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c
index f2046501ce..38e0f83bac 100644
--- a/cpukit/libcsupport/src/libio.c
+++ b/cpukit/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/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c
index 4493b473da..e041668375 100644
--- a/cpukit/libcsupport/src/newlibc.c
+++ b/cpukit/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);