Commit Graph

905 Commits

Author SHA1 Message Date
Sebastian Huber
714617e7ec configure: Remove __RTEMS_HAVE_DECL_SIGALTSTACK__ 2017-01-13 11:46:19 +01:00
Sebastian Huber
6de41c5fe9 Provide kernel space header files
These kernel space header files must be provided for Newlib
172e2050d95b41861db858dd9bc43a3fb4a28987.
2016-11-08 10:15:28 +01:00
Sebastian Huber
8797c76add score: Unify CORE mutex seize/surrender
Use the Thread_Control::resource_count for the no protocol mutexes.
Merge the no protocol and priority inherit CORE mutex seize/surrender
operations.
2016-09-27 15:23:00 +02:00
Sebastian Huber
e41308eab8 score: Introduce Thread_queue_Lock_context
Introduce Thread_queue_Lock_context to contain the context necessary for
thread queue lock and thread wait lock acquire/release operations to
reduce the Thread_Control size.
2016-09-08 09:55:27 +02:00
Gedare Bloom
f23d470616 cpukit: Add and use Watchdog_Discipline.
Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE,
or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with
a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline
of WATCHDOG_NO_TIMEOUT.

updates #2732
2016-07-25 12:44:47 -04:00
Sebastian Huber
2e3ba71256 net: Fix byte order issue for getnameinfo() 2016-07-01 15:16:10 +02:00
Christian Mauderer
095ecbf263 libnetworking: Import current <sys/socket.h>
Import the <sys/socket.h> from current FreeBSD.  This allows to build
some current software (e.g. libressl).
2016-06-28 13:10:01 +02:00
Sebastian Huber
e79a0ca75f libnetworking: Move RTEMS-specific socket wake-up
Close #2748.
2016-06-28 13:10:01 +02:00
Christian Mauderer
4ba4f8218a libnetworking: Hide SO_PRIVSTATE 2016-06-28 13:10:01 +02:00
Christian Mauderer
f0fc2c0e02 libnetworking: Add <machine/_align.h>
This is necessary for new <sys/socket.h>.
2016-06-28 13:10:01 +02:00
Christian Mauderer
4c02385d8f libnetworking: Import current <arpa/inet.h>
Import the <arpa/inet.h> from current FreeBSD.  Necessary due to changes
in <netinet/in.h>.  Remove BSD hack from <arpa/inet.h>.

Clean up problems with htonl().  These functions are defined in
<arpa/inet.h>.  This lead to some problems because they are defined in
<rtems/endian.h> too.  Add NTOHL, ... to
<rtems/rtems_bsdnet_internal.h>.
2016-06-28 13:10:01 +02:00
Christian Mauderer
657e6c93ef libnetworking: Import current <netinet/in.h>
Import the <netinet/in.h> from current FreeBSD.  This allows to build
some current software (e.g. libressl).

Add legacy support like

* prototype for in_cksum(),
* IPPORT_USERRESERVED,
* deprecated IPCTL_RT* defines,
* ip_fw_chk_t and ip_fw_ctl_t,
* ip_nat_... (IP NAT hooks), and
* IP_NAT option for get/setsockopt()

to new <rtems/rtems_netinet_in.h>.
2016-06-28 13:09:44 +02:00
Christian Mauderer
005c3fe701 libnetworking: Import current <netinet6/in6.h>
Import the <netinet6/in6.h> from current FreeBSD.  This allows to build
some current software (e.g. libressl).
2016-06-28 13:02:20 +02:00
Christian Mauderer
f2082cc61d libnetworking: Import <sys/_sockaddr_storage.h>
Import the <sys/_sockaddr_storage.h> from current FreeBSD.  Necessary
for <netinet/in.h> update.
2016-06-28 13:02:20 +02:00
Christian Mauderer
195d412d39 libnetworking: Add minimal getnameinfo()
This implementation just falls back to giving a string representation of
the IP.  It supports IPv4 only.

Add test for getnameinfo().
2016-06-28 13:01:47 +02:00
Christian Mauderer
232d6fecb6 libnetworking: Import current <netdb.h>
Import the <netdb.h> from current FreeBSD.  This allows to build some
current software (e.g. libressl).

Add __h_errno().

Update gethostent_r() API.  Linux and FreeBSD use a common API now.
Adapt the RTEMS one to provide the same one.

Match gethostbyname_r() with prototype.
2016-06-28 13:01:38 +02:00
Christian Mauderer
7e6f2350ea libnetworking: Add <rtems/rtems_netdb.h>
Move prototypes of non-portable _get*by*name/addr and _set/end*ent
functions.  This makes it easier to update <netdb.h>.
2016-06-28 13:01:37 +02:00
Sebastian Huber
b94bbf1cb4 ftpfs: Remove superfluous include 2016-06-09 10:50:47 +02:00
Sebastian Huber
a2f91f6cb8 tftp: Use proper semaphore attr for mutex
Close #2729.
2016-06-06 12:57:07 +02:00
Sebastian Huber
0b713f8940 score: Rework CORE inherit priority mutex
Provide dedicated seize and surrender methods for inherit priority
mutexes.  This eliminates CORE_mutex_Attributes.
2016-05-30 16:16:23 +02:00
Sebastian Huber
5a598ac99b score: Add CORE mutex variants
Add CORE_recursive_mutex_Control and CORE_ceiling_mutex_Control to avoid
the run-time evaluation of attributes to figure out how a particular
mutex methods should behave.  Start with the no protocol variants.  This
eliminates the CORE_MUTEX_DISCIPLINES_FIFO and
CORE_MUTEX_DISCIPLINES_PRIORITY disciplines.
2016-05-30 16:16:23 +02:00
Sebastian Huber
0e1d11f3f0 score: Add _Thread_queue_Context_set_MP_callout()
Add _Thread_queue_Context_set_MP_callout() to simplify
_Thread_queue_Context_initialize().  This makes it possible to more
easily add additional fields to Thread_queue_Context.
2016-05-30 16:16:21 +02:00
Sebastian Huber
cb2651d17b network: Align with Newlib type definitions 2016-05-30 08:11:39 +02:00
Sebastian Huber
dce487912d score: Add Status_Control for all APIs
Unify the status codes of the Classic and POSIX API to use the new enum
Status_Control.  This eliminates the Thread_Control::Wait::timeout_code
field and the timeout parameter of _Thread_queue_Enqueue_critical() and
_MPCI_Send_request_packet().  It gets rid of the status code translation
tables and instead uses simple bit operations to get the status for a
particular API.  This enables translation of status code constants at
compile time.  Add _Thread_Wait_get_status() to avoid direct access of
thread internal data structures.
2016-05-26 21:44:31 +02:00
Sebastian Huber
631b3c8967 score: Move thread queue MP callout to context
Drop the multiprocessing (MP) dependent callout parameter from the
thread queue extract, dequeue, flush and unblock methods.  Merge this
parameter with the lock context into new structure Thread_queue_Context.
This helps to gets rid of the conditionally compiled method call
helpers.
2016-05-25 12:43:54 +02:00
Sebastian Huber
c3d8d9e0bf score: Get rid of mp_id parameter
Get rid of the mp_id parameter used for some thread queue methods.  Use
THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
2016-05-25 12:43:53 +02:00
Sebastian Huber
f009ed086d rtems: Avoid Giant lock for semaphores
Update #2555.
2016-05-02 07:46:15 +02:00
Sebastian Huber
e800b0738b network: Fix warnings 2016-04-22 09:25:11 +02:00
Sebastian Huber
1641088178 network: Ensure matching syscall prototypes
Ensure that kernel and user space system call protoypes are identical.
2016-04-22 09:25:11 +02:00
Sebastian Huber
c6cb9bad75 network: Delete unused in4_cksum() 2016-04-22 09:25:10 +02:00
Sebastian Huber
8765c574b1 score: Remove id parameter _CORE_mutex_Seize()
Parameter was unused.
2016-04-21 07:29:38 +02:00
Sebastian Huber
01226ec56b score: Compatibility with latest Newlib 2016-04-08 08:22:18 +02:00
Sebastian Huber
af13b01888 network: Quirk for Newlib compatibility
Newlib provides now a declration for random() in <stdlib.h>.  This
confilicts with the define in <rtems/rtems_bsdnet_internal.h>.
2016-04-07 09:09:48 +02:00
Sebastian Huber
8f9658187a score: Rework MP thread queue callout support
The thread queue implementation was heavily reworked to support SMP.
This broke the multiprocessing support of the thread queues.  This is
fixed by this patch.

A thread proxy is unblocked due to three reasons
  1) timeout,
  2) request satisfaction, and
  3) extraction.

In case 1) no MPCI message must be sent.  This is ensured via the
_Thread_queue_MP_callout_do_nothing() callout set during
_Thread_MP_Allocate_proxy().

In case 2) and 3) an MPCI message must be sent.  In case we interrupt
the blocking operation during _Thread_queue_Enqueue_critical(), then
this message must be sent by the blocking thread.  For this the new
fields Thread_Proxy_control::thread_queue_callout and
Thread_Proxy_control::thread_queue_id are used.

Delete the individual API MP callout types and use
Thread_queue_MP_callout throughout.  This type is only defined in
multiprocessing configurations.  Prefix the multiprocessing parameters
with mp_ to ease code review.  Multiprocessing specific parameters are
optional due to use of a similar macro pattern.  There is no overhead
for non-multiprocessing configurations.
2016-04-06 09:08:21 +02:00
Sebastian Huber
3bbf40550c network: Special case for RTEMS_MULTIPROCESSING
Allow network tasks to run with priority 0 (PRIORITY_PSEUDO_ISR).
2016-03-29 13:21:32 +02:00
Joel Sherrill
09c993b4bb libnetworking/sys/libkern.h: Disable non-POSIX prototype that is actually unused 2016-03-24 11:41:20 -05:00
Nick Withers
4202a31f91 Chase Newlib sys/types.h / sys/select.h changes 2016-01-18 14:59:52 +01:00
Sebastian Huber
f97536dcd3 basdefs.h: Add and use RTEMS_UNUSED 2015-10-26 09:13:19 +01:00
Martin Galvan
28a870c47f cpukit/libnetworking/rtems/rtems_dhcp.c: Fix compilation error
Apparently 'free' is defined as a macro which takes two arguments and calls
rtems_bsdnet_free. When fixing #2405 I added a missing 'free' but didn't notice
it was non-standard.

Closes #2410.
2015-09-03 15:42:41 -05:00
Martin Galvan
c83bad2fc4 cpukit/libnetworking/rtems/rtems_dhcp.c: Fix leak on realloc failure for dhcp_hostname.
Closes #2405.
2015-09-03 11:28:10 -05:00
Michael Davidsaver
74ef2c101a tftpDriver: close() false error
closes #2376.
2015-07-29 10:56:14 -05:00
Chris Johns
083e6d6b4b libnetworking: Send the hostname if set in the network configuration.
This allows a suitably configured DHCP server with DDNS to enter
the name into the DNS table making it addressiable via it's host name.
2015-07-14 08:15:52 +10:00
Alexander Krutwig
7cd2484c4c timecounter: Use in RTEMS
Replace timestamp implementation with FreeBSD bintime and timecounters.

New test sptests/sptimecounter02.

Update #2271.
2015-05-20 08:40:33 +02:00
Sebastian Huber
4438ac2575 score: Fine grained locking for mutexes
Update #2273.
2015-05-19 12:00:47 +02:00
Sebastian Huber
4db0ae8e07 score: _Objects_Get_isr_disable()
Use ISR_lock_Context instead of ISR_Level to allow use of ISR locks for
low-level locking.

Update #2273.
2015-04-21 08:25:31 +02:00
Sebastian Huber
bf11690ca2 network: Avoid clash with FreeBSD <sys/time.h> 2015-03-09 13:16:06 +01:00
Chris Johns
ee87007748 Panic on RTEMS_FAST_MUTEX network semaphore claim/release.
Fix the code to panic rather than perform a bad access if the network
semaphore is accessed without the stack being intialised.

Closes #2229.
2015-02-24 12:53:29 -05:00
Till Straumann
25e14e3193 networking: alignment exception in ioctl(SIOCGIFCONF)
Access memory using a byte stream when copying to avoid unaligned
access. update #1401
2015-02-23 10:49:50 -05:00
Joel Sherrill
547c2282ee sys/socket.h: Include <sys/types.h> for ssize_t
closes 2245
2015-02-12 15:23:33 -06:00
Sebastian Huber
eb7753437f Filesystem: Delete unused fsmountme_h handler 2015-02-09 15:38:48 +01:00