summaryrefslogtreecommitdiffstats
path: root/c/src/exec
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/exec/libnetworking/arpa/inet.h2
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_syscall.c20
-rw-r--r--c/src/exec/score/cpu/i386/cpu.h26
-rw-r--r--c/src/exec/score/headers/Makefile.in4
-rw-r--r--c/src/exec/score/include/rtems/score/Makefile.in4
5 files changed, 44 insertions, 12 deletions
diff --git a/c/src/exec/libnetworking/arpa/inet.h b/c/src/exec/libnetworking/arpa/inet.h
index fb95ee288a..ad5332e7ab 100644
--- a/c/src/exec/libnetworking/arpa/inet.h
+++ b/c/src/exec/libnetworking/arpa/inet.h
@@ -65,6 +65,7 @@
struct in_addr;
+#if 0 /* RTEMS -- Why rename these? */
/* XXX all new diversions!! argh!! */
#define inet_addr __inet_addr
#define inet_aton __inet_aton
@@ -80,6 +81,7 @@ struct in_addr;
#define inet_ntop __inet_ntop
#define inet_nsap_addr __inet_nsap_addr
#define inet_nsap_ntoa __inet_nsap_ntoa
+#endif
__BEGIN_DECLS
int ascii2addr __P((int, const char *, void *));
diff --git a/c/src/exec/libnetworking/rtems/rtems_syscall.c b/c/src/exec/libnetworking/rtems/rtems_syscall.c
index 794b8d3d8e..a526eb2254 100644
--- a/c/src/exec/libnetworking/rtems/rtems_syscall.c
+++ b/c/src/exec/libnetworking/rtems/rtems_syscall.c
@@ -617,8 +617,8 @@ getsockopt (int s, int level, int name, void *aval, int *avalsize)
return 0;
}
-int
-getpeername (int s, struct sockaddr *name, int *namelen)
+static int
+getpeersockname (int s, struct sockaddr *name, int *namelen, int pflag)
{
struct socket *so;
struct mbuf *m;
@@ -636,7 +636,10 @@ getpeername (int s, struct sockaddr *name, int *namelen)
rtems_bsdnet_semaphore_release ();
return -1;
}
- error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, m);
+ if (pflag)
+ error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, m);
+ else
+ error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, m);
if (error) {
errno = error;
rtems_bsdnet_semaphore_release ();
@@ -652,6 +655,17 @@ getpeername (int s, struct sockaddr *name, int *namelen)
return 0;
}
+int
+getpeername (int s, struct sockaddr *name, int *namelen)
+{
+ return getpeersockname (s, name, namelen, 1);
+}
+int
+getsockname (int s, struct sockaddr *name, int *namelen)
+{
+ return getpeersockname (s, name, namelen, 0);
+}
+
/*
************************************************************************
* RTEMS EXTERNAL I/O HANDLER ROUTINES *
diff --git a/c/src/exec/score/cpu/i386/cpu.h b/c/src/exec/score/cpu/i386/cpu.h
index 7af6bebfad..1b6053912a 100644
--- a/c/src/exec/score/cpu/i386/cpu.h
+++ b/c/src/exec/score/cpu/i386/cpu.h
@@ -64,11 +64,23 @@ extern "C" {
#define CPU_IDLE_TASK_IS_FP FALSE
#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
#define CPU_STACK_GROWS_UP FALSE
#define CPU_STRUCTURE_ALIGNMENT
/*
+ * Does this port provide a CPU dependent IDLE task implementation?
+ *
+ * If TRUE, then the routine _CPU_Thread_Idle_body
+ * must be provided and is the default IDLE thread body instead of
+ * _CPU_Thread_Idle_body.
+ *
+ * If FALSE, then use the generic IDLE thread body if the BSP does
+ * not provide one.
+ */
+
+#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
+
+/*
* Define what is required to specify how the network to host conversion
* routines are handled.
*/
@@ -385,6 +397,18 @@ void _CPU_ISR_install_vector(
);
/*
+ * _CPU_Thread_Idle_body
+ *
+ * Use the halt instruction of low power mode of a particular i386 model.
+ */
+
+#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
+
+void _CPU_Thread_Idle_body( void );
+
+#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
+
+/*
* _CPU_Context_switch
*
* This routine switches from the run context to the heir context.
diff --git a/c/src/exec/score/headers/Makefile.in b/c/src/exec/score/headers/Makefile.in
index 225f7e5bab..920e738c03 100644
--- a/c/src/exec/score/headers/Makefile.in
+++ b/c/src/exec/score/headers/Makefile.in
@@ -23,9 +23,6 @@ SAPI_H_FILES=$(SAPI_H_PIECES:%=$(srcdir)/%.h)
EXTERNAL_H_PIECES =
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
-NET_H_PIECES = in
-NET_H_FILES=$(NET_H_PIECES:%=$(srcdir)/%.h)
-
SRCS=$(H_FILES) $(SAPI_H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
@@ -44,5 +41,4 @@ CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
$(INSTALL) -m 444 ${SAPI_H_FILES} $(PROJECT_INCLUDE)/rtems/
- $(INSTALL) -m 444 ${NET_H_FILES} $(PROJECT_INCLUDE)/netinet
# $(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
diff --git a/c/src/exec/score/include/rtems/score/Makefile.in b/c/src/exec/score/include/rtems/score/Makefile.in
index 225f7e5bab..920e738c03 100644
--- a/c/src/exec/score/include/rtems/score/Makefile.in
+++ b/c/src/exec/score/include/rtems/score/Makefile.in
@@ -23,9 +23,6 @@ SAPI_H_FILES=$(SAPI_H_PIECES:%=$(srcdir)/%.h)
EXTERNAL_H_PIECES =
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
-NET_H_PIECES = in
-NET_H_FILES=$(NET_H_PIECES:%=$(srcdir)/%.h)
-
SRCS=$(H_FILES) $(SAPI_H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
@@ -44,5 +41,4 @@ CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
$(INSTALL) -m 444 ${SAPI_H_FILES} $(PROJECT_INCLUDE)/rtems/
- $(INSTALL) -m 444 ${NET_H_FILES} $(PROJECT_INCLUDE)/netinet
# $(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)