Commit Graph

8207 Commits

Author SHA1 Message Date
Chris Johns
9da8740f05 PR2159: Have the FIFO driver read follow POSIX standard.
The read call was only returning once the requested buffer was full.
The change returns any available data.
2013-12-10 12:33:22 +11:00
Chris Johns
b51d8a4996 libfs/imfs: Set the FIFO control block.
The FIFO was incorrectly set to the default control block.
2013-12-10 12:30:20 +11:00
Joel Sherrill
651e3aa8d8 cpukit/rtems: Remove XXX in comments 2013-12-09 10:17:00 -06:00
Nickolay Semyonov-Kolchin
8ed1a54c57 Fix leap year calculation
Reference: http://en.wikipedia.org/wiki/Leap_year
Bug: https://www.rtems.org/bugzilla/show_bug.cgi?id=1422
2013-12-05 11:57:06 -05:00
Nick Withers
b5d2d4a61c Update to Mongoose 3.9 at the last point before the MIT -> GPL license change
[That is, 04fc209644. See https://groups.google.com/forum/#!topic/mongoose-users/aafbOnHonkI]

The RTEMS patches described in the following emails and made to the previous Mongoose base have been applied:
  - http://www.rtems.org/pipermail/rtems-devel/2012-July/001345.html
  - http://www.rtems.org/pipermail/rtems-devel/2012-July/001343.html
  - http://www.rtems.org/pipermail/rtems-devel/2012-July/001346.html (except to mongoose.1, see below)
...as well as a patch very similar to that discussed at http://forums.bannister.org/ubbthreads.php?ubb=showflat&topic=7600&gonew=1 to provide poll() (which might be able to go away soon, with incoming RTEMS poll() support)

mg_connect(), mg_url_encode() and mg_vprintf() were additionally marked "static" to silence warnings.

mongoose.1 appears to have been removed from the upstream distribution.

Note that the API's changed, for example:
  - A struct mg_callbacks must now be provided to mg_start(). Initialise members to NULL to disable various types of callbacks
  - Callback interfaces have changed significantly in general
  - The short form of options (e.g., "u" instead of "run_as_user") are no longer available (upstream)
  - The "max_request_size" options has been removed
2013-12-04 10:09:16 +01:00
Sebastian Huber
0adc8a74a8 libblock: Use LAST for the last partition block 2013-12-04 09:12:42 +01:00
Wendell P Silva
62ba20d759 PR2157: fdisk partition table dump improvement
Show the correct index of partition's last block (partition end).

The documentation of struct rtems_bdpart_partition (P) says that the member
'end' is the "Block index for partition end (this block is not a part of the
partition)". Then, the fdisk's partition table dump should print ((P)->end -
1).

Currently, one can think that the last block of a partition P is superposing
the beginning of the partition (P + 1). Example:

----------------------------------------
       PARTITION TABLE
------------+------------+--------------
 BEGIN      | END        | TYPE
------------+------------+--------------
       2048 |     133120 |       FAT 32
     133120 |   15628032 |       FAT 32
------------+------------+--------------

With be proposed patch, it would be:
----------------------------------------
       PARTITION TABLE
------------+------------+--------------
 BEGIN      | END        | TYPE
------------+------------+--------------
       2048 |     133119 |       FAT 32
     133120 |   15628031 |       FAT 32
------------+------------+--------------
2013-12-03 14:55:34 -05:00
Gedare Bloom
09a8188452 PR2056: libqos conversion from uint32_t to time_t
AquosA defines qres_params_t using qres_time_t so we should also.
This fixes an invalid conversion from uint32_t into time_t as well.
2013-12-03 10:58:26 -05:00
Sebastian Huber
b4e83061e3 arm: Clear reservations
Recent GCC versions use atomic operations based on load/store exclusive
in the C++ library.
2013-12-03 12:58:47 +01:00
Sebastian Huber
aaaedba981 score: Minor _Thread_Dispatch() optimization
It is not necessary to load the executing thread control again after
the context switch since it is an invariant of the executing thread.
2013-12-02 09:43:29 +01:00
Sebastian Huber
927a0a1f99 posix: Use cleanup contexts on the stack
Provide support for latest Newlib <pthread.h> change.  The cleanup
contexts are stored on the thread stack.  This is conformant with the
POSIX requirements for the pthread_cleanup_push() and
pthread_cleanup_pop() statement pair.

Passing an invalid pointer as the routine to pthread_cleanup_push() is
now a usage error and the behaviour is undefined.
2013-12-02 09:24:51 +01:00
Sahil Patnayakuni
ad36dc2c36 POSIX timers: Add restrict keyword
+ timer_create()
+ timer_settime()
2013-11-29 17:24:41 -06:00
Bryan Dunsmore
77b1de22cc gettimeofday: Add restrict keyword 2013-11-29 17:24:41 -06:00
Chirayu Desai
4f8ac347f3 libcsupport: readlink: add c99 'restrict' keyword
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
2013-11-29 17:24:41 -06:00
Bryan Dunsmore
e5d60243f9 signal methods: Add restrict keyword 2013-11-29 17:24:41 -06:00
Philipp Eppelt
6ffaeb2899 add --enable-paravirt in cpukit configure scripts 2013-11-27 15:54:04 -05:00
Joel Sherrill
03e54614a3 statvfs filesystem handlers: Remove restrict 2013-11-27 13:06:16 -06:00
Sebastian Huber
ea3e6928ba nios2: Typos 2013-11-26 10:02:09 +01:00
Sebastian Huber
1350a70254 score: Format changes in _Thread_Set_state() 2013-11-26 10:02:08 +01:00
Sebastian Huber
96962b5d7a score: Simplify _Thread_queue_Dequeue_priority() 2013-11-26 10:02:08 +01:00
Sebastian Huber
e99b0e2384 score: Use local variables for consistency 2013-11-26 10:02:08 +01:00
Daniel Ramirez
bb81e04ae3 statvfs and ALL filesystem handlers: Add restrict keyword. 2013-11-21 16:56:48 -06:00
Sebastian Huber
4ea97d2449 score/rbtree: Remove "unprotected" from API 2013-11-21 12:58:46 +01:00
Sebastian Huber
833dd90335 score/rbtree: Delete protected operations
The user of the red-black tree container must now ensure that at most
one thread at once can access an instance.
2013-11-21 12:58:46 +01:00
Sebastian Huber
eea7c93706 scheduler/EDF: Use unprotected insert and extract
Interrupts are disabled by the caller _Thread_Change_priority() or
_Thread_Set_transient() or directly in the scheduler operation.  Thus
there is no need to use protected variants.
2013-11-21 12:58:45 +01:00
Daniel Ramirez
14876018c3 select.h, rtems_select.c, nds select: Add restrict keyword 2013-11-20 18:24:48 -06:00
Sebastian Huber
39a4574652 powerpc: Add r2 to CPU context
The r2 may be used for thread-local storage.
2013-11-18 14:56:43 +01:00
Sebastian Huber
8dc2e7bd7e powerpc: Do not validate reserved XER bits 2013-11-18 14:56:43 +01:00
Sebastian Huber
3a7628e86a score: Objects_Information::extract visibility
This filed is only used if RTEMS_MULTIPROCESSING is defined.
2013-11-18 14:56:43 +01:00
Sebastian Huber
85b5264211 heapgetinfo: Free all delayed blocks 2013-11-18 14:56:42 +01:00
Joel Sherrill
f8a39cdc5f no_cpu/.../cpu.h: Comment improvement 2013-11-14 17:27:13 -06:00
Joel Sherrill
bd90283947 mips/.../cpu.h: Comment improvement 2013-11-14 17:26:31 -06:00
Sebastian Huber
17ba41982a monitor: Add support for BSD wakeup state 2013-11-14 15:58:03 +01:00
Sebastian Huber
8cb28826ff Filesystem: Add kernel event filter handler
This handler is necessary to implement the KQUEUE(2) system calls.

Add <sys/event.h> from FreeBSD 8.4.
2013-11-04 15:22:48 +01:00
Sebastian Huber
1682946057 Filesystem: Add poll() handler
This handler is necessary to implement the SELECT(2) and POLL(2) system
calls.

Add <sys/poll.h> from FreeBSD 8.4.
2013-11-04 15:22:47 +01:00
Sebastian Huber
ba120d1aaa Filesystem: Use ENOTTY for default ioctl() handler
This is in line with Linux and FreeBSD.
2013-10-31 14:32:25 +01:00
Sebastian Huber
8d66446c2b Filesystem: Documentation 2013-10-31 14:32:24 +01:00
Sebastian Huber
4479006955 libmd: Change MD5Update() prototype
This is in line with the FreeBSD and OpenSSL prototypes.  It helps to
avoid superfluous compiler warnings.
2013-10-31 14:32:24 +01:00
Sebastian Huber
61e3d1ad1e Filesystem: Clear open flag early in close()
This helps to prevent the usage of a file descriptor which is about to
close in some situations.
2013-10-31 14:30:41 +01:00
Sebastian Huber
d44d31ca0e Filesystem: Zero flags in rtems_libio_free() 2013-10-31 14:30:37 +01:00
Sebastian Huber
b68cef17e0 score: New state STATES_WAITING_FOR_BSD_WAKEUP
This state is necessery to implement the SLEEP(9) FreeBSD kernel API.
2013-10-31 14:29:18 +01:00
Sebastian Huber
73e734535b IMFS: Use IMFS_mtime_ctime_update() 2013-10-27 18:51:01 +01:00
Sebastian Huber
5fe19134c0 Filesystem: PR2146: Documentation 2013-10-23 10:59:38 +02:00
Sebastian Huber
8e8b18bb5b libmd: New defines for FreeBSD compatibility 2013-10-22 11:00:04 +02:00
Ralf Kirchner
e89ed92495 dosfs: Ensure initially the sector size is used as bdbuf block size 2013-10-18 12:08:00 -04:00
Ric Claus
865c307242 Remove double count of start offset 2013-10-17 08:59:55 +02:00
Sebastian Huber
b8de8281cb libcsupport: Updates from latest FreeBSD version 2013-10-16 15:19:30 +02:00
Sebastian Huber
1f724a0309 RFS: Include missing header file 2013-10-16 14:45:00 +02:00
Sebastian Huber
816a9cad30 Filesystem: PR2146: Documentation 2013-10-15 09:10:38 +02:00
Sebastian Huber
3c2bb2238a Return EINVAL in default ftruncate() handler
According to POSIX this case is implementation defined.  Linux and
FreeBSD return EINVAL.
2013-10-11 16:22:00 +02:00