Commit Graph

24553 Commits

Author SHA1 Message Date
Sebastian Huber
c93fc2b36b libblock: rtems_ide_part_table_initialize() API 2012-03-13 12:24:17 +01:00
Sebastian Huber
c649976859 libblock: New block IO control support functions 2012-03-13 12:24:17 +01:00
Sebastian Huber
4f3cbd9240 libblock: New IO control RTEMS_BLKIO_GETDISKDEV 2012-03-13 12:24:17 +01:00
Sebastian Huber
03ad6b1d85 libblock: Avoid bdbuf API 2012-03-13 12:24:17 +01:00
Sebastian Huber
5e88538f97 libblock: Split file 2012-03-13 12:24:17 +01:00
Sebastian Huber
beea58072d libblock: Add optional free at delete request 2012-03-13 12:24:16 +01:00
Sebastian Huber
e998c98518 IMFS: Node specific stat handlers 2012-03-13 12:24:16 +01:00
Sebastian Huber
04ca77e31d IMFS: Generic device identifier 2012-03-13 12:24:16 +01:00
Sebastian Huber
c5392ef924 IMFS: Add make generic node support
Generic nodes are an alternative to standard drivers in RTEMS.  The
handlers of a generic node are called with less overhead compared to the
standard driver operations.  The usage of file system node handlers
enable more features like support for fsync() and fdatasync().  The
generic nodes use the reference counting of the IMFS.  This provides
automatic node destruction when the last reference vanishes.

Extend type IMFS_types_union by new type IMFS_generic_t.

Extend enum IMFS_jnode_types_t by IMFS_GENERIC.

Add functions
 o IMFS_make_generic_node(),
 o IMFS_is_imfs_instance(),
 o IMFS_generic_get_context_by_node(),
 o IMFS_generic_get_context_by_location(), and
 o IMFS_generic_get_context_by_iop().

New test fstests/fsimfsgeneric01.
2012-03-13 12:24:16 +01:00
Sebastian Huber
699ac7c08f IMFS: Add and use node control
Add and use structure IMFS_node_control with support functions.  This
helps to make high level functions independent of the node type and
reduces the number of branches in the code.
2012-03-13 12:24:16 +01:00
Sebastian Huber
70927458b7 IMFS: New support functions
Add and use IMFS_type() and IMFS_is_directory().
2012-03-13 12:24:16 +01:00
Sebastian Huber
6661435f84 IMFS: Removed superfluous imfs_dir_open() 2012-03-13 12:24:16 +01:00
Sebastian Huber
1bdff036ac IMFS: Reference counting for nodes
The introduction of reference counting of nodes avoids the removal of
open nodes and potential usage of freed memory.
2012-03-13 12:24:15 +01:00
Sebastian Huber
2e0ce55bf0 IMFS: Use unprotected chain operations
Directory entry add or removal operations are protected by the file
system instance lock.  There is no need for protected chain operations.
2012-03-13 12:24:15 +01:00
Sebastian Huber
316507ab91 IMFS: Lock the file system during directory reads
Other threads may add or remove directory entries during a read of the
directory.  Use the file system instance lock for protection.
2012-03-13 12:24:15 +01:00
Sebastian Huber
e00cca9b74 IMFS: Do not check for unsupported types
Allow creation of nodes with an unsupported type.  Later the usage of
such nodes will return an error status.
2012-03-13 12:24:15 +01:00
Sebastian Huber
2563410019 Filesystem: Rename defines
o Removed RTEMS_LIBIO_PERMS_SEARCH.
 o Renamed RTEMS_LIBIO_PERMS_READ in RTEMS_FS_PERMS_READ.
 o Renamed RTEMS_LIBIO_PERMS_WRITE in RTEMS_FS_PERMS_WRITE.
 o Renamed RTEMS_LIBIO_PERMS_EXEC in RTEMS_FS_PERMS_EXEC.
 o Renamed RTEMS_LIBIO_FOLLOW_HARD_LINK in RTEMS_FS_FOLLOW_HARD_LINK.
 o Renamed RTEMS_LIBIO_FOLLOW_SYM_LINK in RTEMS_FS_FOLLOW_SYM_LINK.
 o Renamed RTEMS_LIBIO_MAKE in RTEMS_FS_MAKE.
 o Renamed RTEMS_LIBIO_EXCLUSIVE in RTEMS_FS_EXCLUSIVE.
 o Renamed RTEMS_LIBIO_ACCEPT_RESIDUAL_DELIMITERS in
   RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS.
 o Renamed RTEMS_LIBIO_REJECT_TERMINAL_DOT in
 RTEMS_FS_REJECT_TERMINAL_DOT.
2012-03-13 12:24:10 +01:00
Sebastian Huber
4116fce629 Filesystem: New defaults fsync_h and fdatasync_h
New defaults rtems_filesystem_default_fsync_or_fdatasync() and
rtems_filesystem_default_fsync_or_fdatasync_success() for fsync_h and
fdatasync_h.  The rtems_filesystem_default_fsync_or_fdatasync() sets now
errno to EINVAL according to POSIX.
2012-03-13 12:23:45 +01:00
Sebastian Huber
bea7043c80 Filesystem: Change node type enum values
Move the RTEMS_FILESYSTEM_INVALID_NODE_TYPE to the end.  This makes it
possible to use this enum easily as an array index.  Most comparisons
are made against RTEMS_FILESYSTEM_DIRECTORY.  A value of zero allows on
some architectures simpler branch operations.
2012-03-13 12:23:45 +01:00
Sebastian Huber
a76c23738b Filesystem: Change error indication
Change error indication to ESPIPE in rtems_filesystem_default_lseek().
2012-03-13 12:23:45 +01:00
Sebastian Huber
adef4e4696 Filesystem: New function
New function rtems_filesystem_default_lseek_success().
2012-03-13 12:23:45 +01:00
Sebastian Huber
3ba4f828e4 Filesystem: Read-only file system checks
o Make sure EROFS is indicated for write operations on a read-only file
   system.
 o Add error indication for read-only file systems in fchmod() and
   fchown() according to POSIX.
2012-03-13 12:23:44 +01:00
Sebastian Huber
3b7c123c8d Filesystem: Reference counting for locations
o A new data structure rtems_filesystem_global_location_t was
   introduced to be used for
    o the mount point location in the mount table entry,
    o the file system root location in the mount table entry,
    o the root directory location in the user environment, and
    o the current directory location in the user environment.
   During the path evaluation global start locations are obtained to
   ensure that the current file system instance will be not unmounted in
   the meantime.
 o The user environment uses now reference counting and is protected
   from concurrent access.
 o The path evaluation process was completely rewritten and simplified.
   The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
   method.  Recursive calls in the path evaluation have been replaced
   with iteration to avoid stack overflows.  Only the evaluation of
   symbolic links is recursive.  No dynamic memory allocations and
   intermediate buffers are used in the high level path evaluation.  No
   global locks are held during the file system instance specific path
   evaluation process.
 o Recursive symbolic link evaluation is now limited by
   RTEMS_FILESYSTEM_SYMLOOP_MAX.  Applications can retrieve this value
   via sysconf().
 o The device file system (devFS) uses now no global variables and
   allocation from the workspace.  Node names are allocated from the
   heap.
 o The upper layer lseek() performs now some parameter checks.
 o The upper layer ftruncate() performs now some parameter checks.
 o unmask() is now restricted to the RWX flags and protected from
   concurrent access.
 o The fchmod_h and rmnod_h file system node handlers are now a file
   system operation.
 o The unlink_h operation has been removed.  All nodes are now destroyed
   with the rmnod_h operation.
 o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
   operations.
 o The path evaluation and file system operations are now protected by
   per file system instance lock and unlock operations.
 o Fix and test file descriptor duplicate in fcntl().
 o New test fstests/fsnofs01.
2012-03-13 12:23:37 +01:00
Joel Sherrill
0bda8b47a6 Add missing BSD sections. 2012-03-09 10:33:09 -06:00
Sebastian Huber
c5a6e617a5 bsp/gen5200: Fix FPU initialization
The change of the MSR[FP] status requires a context-synchronizing
instruction.
2012-03-09 15:55:32 +01:00
Sebastian Huber
3bd4656fc4 bsp/gen5200: Reflect clocks of new BRS5L hardware 2012-03-09 15:55:31 +01:00
Joel Sherrill
314d3272df Merge branch 'master' of ssh://git.rtems.org/data/git/rtems 2012-03-06 08:36:49 -06:00
Werner Almesberger
47a45e5cd8 Milkymist - Increase SOFTUSB_PMEM_SIZE to 8 KB
We increased PMEM to 8 kB but never updated SOFTUSB_PMEM_SIZE.
This didn't have much of an effect because all we used it for was
to zero unused program memory - which we should never touch
anyway.

But now that "usb load" in FN uses SOFTUSB_PMEM_SIZE, this caused
it to silently truncate the firmware, producing rather puzzling
effects.

Signed-off-by: Joel Sherrill <joel.sherrill@oarcorp.com>
2012-03-06 08:25:39 -06:00
Gedare Bloom
41d33b9030 score: Add _RBTree_Opposite_direction.
Add a red-black tree helper method to ease obtaining the direction opposite
to the current direction. Useful for manipulating and traversing an rbtree.
2012-03-04 11:42:08 -05:00
Gedare Bloom
a52be5ec40 PR2034: sprbtree01: predecessor/successor imprecision
The tests for the rtems_rbtree_predecessor/successor check for a
range of values for the target id of the predecessor/successor
when we know the exact expected value. This commit makes the
test more precise.
2012-03-04 08:49:28 -05:00
Sebastien Bourdeauducq
dc1a3b9c6c PR 2032: Milkymist USB: Ioctl interface for loading USB firmware
Leave the task of providing a suitable firmware for the Milkymist softusb
core to the application instead of having an inflexible array in the driver.

Signed-off-by: Gedare Bloom <gedare@rtems.org>
2012-03-03 16:02:33 -05:00
Xiangfu Liu
f0d2261beb PR2029: Milkymist VGA: adjust video timings
Slightly adjust video timing registers since we had problems with a few screens and the previous values.

Signed-off-by: Gedare Bloom <gedare@rtems.org>
2012-03-03 15:50:53 -05:00
Ralf Corsépius
ac165341df 2011-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/src/spin.c: Include "test_support.h".
2012-03-02 18:16:33 +01:00
Ralf Corsépius
e6a675e6f9 2011-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxtmmq01/init.c: Make benchmark_mq_open,
	benchmark_mq_open_second, benchmark_mq_close,
	benchmark_mq_close_second, benchmark_mq_unlink, benchmark_mq_notify,
	benchmark_mq_send, benchmark_mq_receive, benchmark_mq_timedsend,
	benchmark_mq_timedreceive static.
	* psxtmmutex01/init.c: Make test_mutex_create, test_mutex_destroy
	static.
	* psxtmsem02/init.c: benchmark_sem_getvalue, benchmark_sem_wait,
	benchmark_sem_post, benchmark_sem_trywait_available,
	benchmark_sem_trywait_not_available static.
2012-03-02 14:51:10 +01:00
Ralf Corsépius
7f2036aa35 2012-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/resolv.h: Partial sync with FreeBSD.
	Add decls for res_send_setqhook, res_send_setrhook.
2012-03-02 13:03:35 +01:00
Ralf Corsépius
396b80ebf6 2012-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Check for rcmd in unistd.h.
	* libnetworking/libc/rcmd.c: Build iff rcmd is declared in unistd.h.
	Change rcmd's decl to match with Linux/FreeBSD's decl.
2012-03-02 09:40:03 +01:00
Werner Almesberger
f7bb9f922d PR2028: Milkymist USB: forward MIDI messages.
Forward MIDI messages from the softusb controller to the application.

Signed-off-by: Gedare Bloom <gedare@rtems.org>
2012-02-29 11:08:44 -05:00
Joel Sherrill
19d18f2350 Fix typo in comment. 2012-02-23 12:09:55 -06:00
Jennifer Averett
8f7f6caaef Merge remote-tracking branch 'upstream/master' 2012-02-23 10:43:58 -06:00
Jennifer Averett
4f1173bcde Avoid NULL dereference in printk() before libchip console initialized
With the addition of dynamically registered libchip serial devices,
there is the need to be able to use printk() before the console driver
has initialized the indirect pointer table. This lets printk() support
routines call pass a control structure directly without a lookup through
the uninitialized indirect one.
2012-02-23 10:40:33 -06:00
Sebastian Huber
9294f8fe2e psxtests: Fix typo in psxstat 2012-02-23 11:16:10 +01:00
Sebastian Huber
8d8f363bd5 LPC32XX: Typo 2012-02-23 11:16:10 +01:00
Sebastian Huber
a4097fdb2f PR 2026/filesystem - Fix semaphore attributes
Semaphores of type RTEMS_SIMPLE_BINARY_SEMAPHORE are not suitable for a
mutex.  Use RTEMS_BINARY_SEMAPHORE with RTEMS_INHERIT_PRIORITY instead.
2012-02-23 11:16:09 +01:00
Ralf Corsépius
6903c7cd9d 2012-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* .gitignore: Remove config.guess, config.sub, missing, install-sh.
	* config.guess, config.sub, missing, install-sh: New.
2012-02-22 12:20:57 +01:00
Ralf Corsépius
692aefeb63 2012-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/assocnamebad.c:
	Add #define INSIDE_ASSOC.
2012-02-22 10:02:48 +01:00
Ralf Corsépius
5693f2e69b 2012-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* sapi/include/confdefs.h:
	Add decl of configuration_mount_table (Fix c++ mangling).
2012-02-22 10:02:42 +01:00
Ralf Corsépius
56f1fbed85 2012-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* pppd/system.h: Add pppdapp_initialize.
	* pppd/init.c: Remove pppdapp_initialize.
2012-02-22 09:33:18 +01:00
Ralf Corsépius
99aebcbc86 2012-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* nsecs/system.h: New (Split out from nsecs/init.c).
	* nsecs/init.c: Reflect nsecs/system.h having been split out.
	* nsecs/empty.c: Include "system.h".
2012-02-22 09:33:10 +01:00
Joel Sherrill
39e8aa9603 PR 2015 - LEON3: make SHM driver configurable using weak
PR 2015/bsps

Since the configuration struct is always present one can let
DATA initialize it to reduce footprint, at the same time it
is made weak to let the user able to configure the SHM driver
without editing the driver code.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2012-02-17 14:28:19 -06:00
Sebastian Huber
77998753b5 Use alternative API
Replaced Allocate_majority_of_workspace() with
rtems_workspace_allocate().  Replaced Allocate_majority_of_heap() with
rtems_heap_greedy_allocate().
2012-02-17 16:56:17 +01:00