Commit Graph

446 Commits

Author SHA1 Message Date
Joel Sherrill
edd1748524 2009-01-29 Nickolay Semyonov-Kolchin <nbkolchin@gmail.com>
PR 1359/cpukit
	* libcsupport/src/libio.c: rtems_libio_allocate:
	rtems_libio_iop_freelist incorrectly zeroed on semaphore error. Now
	checks error and does not modify anything until sure it has created
	semaphore.
2009-01-29 17:18:43 +00:00
Joel Sherrill
b897028fe0 2009-01-29 Eric Norum <norume@aps.anl.gov>
PR 1364/cpukit
	* libcsupport/src/gxx_wrappers.c: Fix compilation problems when
	diagnostics enabled.
2009-01-29 14:32:43 +00:00
Joel Sherrill
3507c6df70 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/gxx_wrappers.c, posix/include/mqueue.h,
	posix/include/rtems/posix/semaphore.h,
	posix/inline/rtems/posix/barrier.inl,
	posix/inline/rtems/posix/key.inl,
	posix/inline/rtems/posix/mqueue.inl,
	posix/inline/rtems/posix/rwlock.inl,
	posix/inline/rtems/posix/semaphore.inl,
	posix/inline/rtems/posix/spinlock.inl,
	posix/inline/rtems/posix/timer.inl, posix/src/condget.c,
	posix/src/mqueuenametoid.c, posix/src/mutexget.c,
	posix/src/semaphorenametoid.c, posix/src/semopen.c,
	sapi/src/itronapi.c, sapi/src/posixapi.c: Make changes necessary for
	all tests to run on SPARC with 16-bit Ids. This required ensuring
	that all POSIX and compilering binding code makes a distinction
	between the public Id type (e.g. pthread_t, etc.) and the RTEMS
	Object_Id type. All POSIX Object Get routines should not take the
	POSIX Id type as the argument. Sixteen bit RTEMS Ids should be placed
	into the 32-bits reserved by the POSIX API type in a uniform manner
	now. This removed all assumptions that the external Id types in POSIX
	and ITRON are the same as the internal Object Id type.
2009-01-05 20:26:01 +00:00
Ralf Corsepius
a3a12ee1ef Remove hpux9 anachronism. 2009-01-05 14:10:21 +00:00
Ralf Corsepius
883043bc14 Use external scandir if available. 2009-01-04 15:34:08 +00:00
Joel Sherrill
6fee03898f 2008-12-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/malloc_statistics_helpers.c: Use intptr_t not
	ssize_t.
2008-12-21 21:29:03 +00:00
Joel Sherrill
3d66dfc1cb 2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__times.c, posix/src/adjtime.c,
	posix/src/clockgetres.c, posix/src/sysconf.c,
	rtems/src/clockgettickspersecond.c, rtems/src/clockgettod.c,
	rtems/src/clockset.c, rtems/src/clocktodvalidate.c,
	score/src/timespecfromticks.c, score/src/timespectoticks.c,
	score/src/ts64toticks.c: More case converted to use configuration
	table entry not _TOD_Microseconds_per_tick.
2008-12-16 17:36:01 +00:00
Joel Sherrill
41eb1e4090 2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/realloc.c, rtems/include/rtems/rtems/region.h,
	rtems/src/regioncreate.c, rtems/src/regionextend.c,
	rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c,
	rtems/src/regionmp.c, rtems/src/regionresizesegment.c,
	sapi/include/rtems/config.h, score/include/rtems/score/heap.h,
	score/include/rtems/score/protectedheap.h, score/src/heap.c,
	score/src/heapallocate.c, score/src/heapallocatealigned.c,
	score/src/heapextend.c, score/src/heapresizeblock.c,
	score/src/heapsizeofuserarea.c, score/src/pheapallocate.c,
	score/src/pheapallocatealigned.c, score/src/pheapextend.c,
	score/src/pheapgetblocksize.c, score/src/pheapresizeblock.c: Change
	sizes of heap/region and allocated objects in heap to intptr_t so
	they can be larger than a single allocatable object (e.g. size_t).
2008-12-14 22:48:54 +00:00
Ralf Corsepius
1cb54d1f38 #include <stdint.h> instead of <rtems/stdint.h>. 2008-12-11 00:47:56 +00:00
Ralf Corsepius
539b07cb88 Add prototypes. 2008-12-10 23:05:50 +00:00
Joel Sherrill
c16bcc009b 2008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c,
	libmisc/cpuuse/cpuusagereset.c, posix/src/clockgettime.c,
	posix/src/pthread.c, posix/src/timersettime.c,
	rtems/include/rtems/rtems/ratemon.h,
	rtems/src/clockgetsecondssinceepoch.c, rtems/src/clockgetuptime.c,
	rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c,
	rtems/src/ratemonreportstatistics.c, rtems/src/taskwakewhen.c,
	rtems/src/timerfirewhen.c, rtems/src/timerserver.c,
	rtems/src/timerserverfirewhen.c, score/Makefile.am,
	score/preinstall.am, score/include/rtems/score/thread.h,
	score/include/rtems/score/tod.h, score/src/coretod.c,
	score/src/coretodget.c, score/src/coretodgetuptime.c,
	score/src/coretodset.c, score/src/coretodtickle.c,
	score/src/threaddispatch.c, score/src/threadinitialize.c: Add
	SuperCore handler Timestamp to provide an opaque class for the
	representation and manipulation of uptime, time of day, and the
	difference between two timestamps. By using SuperCore Timestamp, it
	is clear which methods and APIs really have to be struct timespec and
	which can be in an optimized native format.
	* score/include/rtems/score/timestamp.h,
	score/src/coretodgetuptimetimespec.c: New files.
2008-12-08 19:41:31 +00:00
Ralf Corsepius
1749cefdad Compile contents conditionally. 2008-12-05 06:44:40 +00:00
Joel Sherrill
bd59b348c6 2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/newlibc_exit.c, score/src/threadhandler.c: Do not
	think about running init/fini on AVR. We do not know what mechanism
	it uses but this is not it.
2008-11-20 19:42:41 +00:00
Joel Sherrill
f06e5a86b1 2008-11-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am: Add getrusage().
	* libcsupport/src/getrusage.c: New file.
2008-11-12 15:36:49 +00:00
Joel Sherrill
2e500def76 2008-11-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/ttyname.c: Change third parameter of ttyname to be
	size_t instead of int.
2008-11-07 16:56:40 +00:00
Joel Sherrill
8e37731cd0 2008-10-14 Tim Cussins <timcussins@eml.cc>
* libcsupport/src/free.c: Should print begin field not start field.
2008-10-14 16:08:58 +00:00
Joel Sherrill
e2324c081a 2008-10-14 Wei Shen <cquark@gmail.com>
* Makefile.am, preinstall.am, libcsupport/src/mknod.c,
	libcsupport/src/open.c, libcsupport/src/pipe.c, libfs/Makefile.am,
	libfs/preinstall.am, libfs/src/imfs/imfs.h,
	libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c,
	libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_initsupp.c,
	libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_stat.c,
	libfs/src/imfs/memfile.c: Initial commit of POSIX pipe support.
	* libfs/src/imfs/imfs_fifo.c, libfs/src/pipe/fifo.c,
	libfs/src/pipe/pipe.c, libfs/src/pipe/pipe.h: New files.
2008-10-14 15:06:25 +00:00
Joel Sherrill
db41bb6784 2008-10-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/printk.c: Addresses can be larger than integers
	so use long for %p formats.
	* score/inline/rtems/score/address.inl: Offsets can be positive or
	negative, so use int32_t.  Also do math with intptr_t since there
	are cases where the number of bits in an address do not equal the
	number of bits in an integer.
	* score/inline/rtems/score/heap.inl: Offsets can be positive or
	negative, so use int32_t.
2008-10-03 22:27:01 +00:00
Joel Sherrill
5365e6066f 2008-10-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Add m32r.
	* libcsupport/src/newlibc_exit.c: For some odd reason, the fini
	symbol for the m32r in C needs an extra leading _.
2008-10-03 19:42:30 +00:00
Joel Sherrill
4c09f4b3fe 2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/malloc_statistics_helpers.c,
	libcsupport/src/realloc.c, rtems/include/rtems/rtems/region.h,
	rtems/include/rtems/rtems/support.h,
	rtems/src/regiongetsegmentsize.c, rtems/src/regionresizesegment.c,
	rtems/src/workspace.c, sapi/include/confdefs.h,
	score/include/rtems/score/heap.h,
	score/include/rtems/score/protectedheap.h,
	score/include/rtems/score/wkspace.h, score/src/heap.c,
	score/src/heapallocate.c, score/src/heapallocatealigned.c,
	score/src/heapextend.c, score/src/heapresizeblock.c,
	score/src/heapsizeofuserarea.c, score/src/pheapgetblocksize.c,
	score/src/wkspace.c: Change size_t to ssize_t on all Heap, Workspace
	and Region calls. On 16-bit architectures, size_t can be 16-bits
	which would limit sizes to 64K.
2008-10-02 20:56:55 +00:00
Joel Sherrill
23c3f72e4d 2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/rtems/bspIo.h, libcsupport/Makefile.am: Add genchark() for
	polled debug input from the same device as printk().
	* libcsupport/src/getchark.c: New file.
2008-09-22 21:47:04 +00:00
Joel Sherrill
bd5984deb7 2008-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/free.c, libcsupport/src/malloc.c,
	libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_p.h,
	libcsupport/src/malloc_sbrk_helpers.c,
	libcsupport/src/malloc_statistics_helpers.c,
	libcsupport/src/malloc_walk.c, libcsupport/src/mallocfreespace.c,
	libcsupport/src/mallocinfo.c, libcsupport/src/realloc.c,
	libcsupport/src/rtems_memalign.c, sapi/include/confdefs.h,
	score/inline/rtems/score/thread.inl: Add support for optionally
	having a unified work area. In other words, the RTEMS Workspace and C
	Program Heap are the same pool of memory.
2008-09-17 18:37:55 +00:00
Joel Sherrill
d40da79b04 2008-09-17 Miao Yan <yanmiaobest@gmail.com>
* Makefile.am, preinstall.am, libcsupport/Makefile.am,
	libcsupport/include/rtems/libcsupport.h,
	libcsupport/include/rtems/libio.h, libcsupport/src/base_fs.c,
	libcsupport/src/libio_init.c, libcsupport/src/newlibc_exit.c,
	libcsupport/src/newlibc_init.c, libcsupport/src/sync.c,
	libfs/Makefile.am, libfs/src/imfs/deviceio.c,
	sapi/include/confdefs.h: Merge GSOC project code to add simple device
	only filesystem (devfs), optionally completely drop out filesystem,
	and to clean up disabling newlib reentrancy support. This dropped 17K
	from the minimum.exe for sparc/sis and arm/rtl22xx_t now has a 15K
	code space.
	* libcsupport/src/__usrenv.c, libcsupport/src/newlibc_reent.c,
	libfs/src/devfs/devclose.c, libfs/src/devfs/devfs.h,
	libfs/src/devfs/devfs_eval.c, libfs/src/devfs/devfs_init.c,
	libfs/src/devfs/devfs_mknod.c, libfs/src/devfs/devfs_node_type.c,
	libfs/src/devfs/devfs_show.c, libfs/src/devfs/devioctl.c,
	libfs/src/devfs/devopen.c, libfs/src/devfs/devread.c,
	libfs/src/devfs/devstat.c, libfs/src/devfs/devwrite.c,
	libfs/src/imfs/deviceerrno.c: New files.
	* libcsupport/src/newlibc.c: Removed.
2008-09-17 16:12:04 +00:00
Joel Sherrill
a5b6cdda58 2008-09-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/include/rtems/libio_.h, libcsupport/src/libio_sockets.c,
	libfs/src/dosfs/fat.h, libfs/src/dosfs/msdos.h,
	libfs/src/imfs/deviceio.c, libmisc/monitor/mon-monitor.c,
	libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c,
	libmisc/monitor/monitor.h, libmisc/stackchk/internal.h,
	rtems/inline/rtems/rtems/part.inl, score/include/rtems/system.h,
	score/include/rtems/score/bitfield.h, score/src/mpci.c,
	score/src/objectextendinformation.c, score/src/threadmp.c: Remove
	extraneous spaces.
2008-09-08 15:19:34 +00:00
Joel Sherrill
f2b169a4a5 2008-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/assocnamebad.c: Correct file name in message.
2008-09-05 21:35:04 +00:00
Ralf Corsepius
4088d01d9f Convert using "bool". 2008-09-01 11:42:19 +00:00
Thomas Doerfler
4b23c94504 various changes to gen83xx BSP and others 2008-08-26 11:55:31 +00:00
Ralf Corsepius
7e19113351 Stop using old-style function-definitions. 2008-08-25 11:19:33 +00:00
Ralf Corsepius
68c65d657a Use %zi to print size_t. 2008-08-25 11:15:14 +00:00
Joel Sherrill
ccec63e98d 2008-08-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/error.c, libmisc/dummy/dummy.c,
	rtems/src/rtemsobjectgetapiclassname.c,
	rtems/src/rtemsobjectgetapiname.c: Add 0 for missing initializers.
2008-08-20 19:31:24 +00:00
Joel Sherrill
0e4e56ba2a 2008-08-19 Cedric Aubert <cedric_aubert@yahoo.fr>
PR 500/misc
	* libcsupport/src/termios.c: Avoid potential buffer overflow.
2008-08-19 20:20:34 +00:00
Joel Sherrill
1487880d2c 2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/include/rtems/libcsupport.h, libcsupport/src/scandir.c,
	libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-monitor.c,
	libmisc/serdbg/serdbg.c, libmisc/serdbg/serdbg.h,
	libnetworking/netinet/in_cksum_powerpc.h, shttpd/compat_rtems.h: Fix
	warnings.
2008-08-18 21:16:42 +00:00
Joel Sherrill
f73fc29d66 2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/task.h, itron/src/def_cyc.c,
	itron/src/task.c, libcsupport/src/newlibc_exit.c,
	libcsupport/src/sync.c, libfs/src/imfs/imfs_fchmod.c,
	posix/include/rtems/posix/pthread.h, posix/src/pthread.c,
	posix/src/sysconf.c, rtems/include/rtems/rtems/tasks.h,
	rtems/src/tasks.c, score/include/rtems/score/stack.h,
	score/inline/rtems/score/stack.inl,
	score/inline/rtems/score/thread.inl, score/src/threadhandler.c: Fix
	various nested-externs warnings.
2008-08-18 19:18:52 +00:00
Joel Sherrill
e49bb54227 2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am, libcsupport/src/newlibc.c: Split libc_init()
	into a separate file to avoid linkage dependencies on newlibc.c which
	in turn pulls in fclose() and other C library methods.
	* libcsupport/src/newlibc_init.c: New file.
2008-08-18 15:43:45 +00:00
Chris Johns
8192e4ff61 2008-08-07 Chris Johns <chrisj@rtems.org>
* libcsupport/src/_rename_r.c: Fixed return code bug. Add a check
	to see if the 'to' path was a directory and removed the directory.

	* libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added the mv command.

	* libmisc/shell/main_mv.c, libmisc/shell/pathnames-mv.h: New.
2008-08-07 02:23:11 +00:00
Joel Sherrill
8b08935eb8 2008-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 537/bsps
	* libcsupport/include/rtems/libcsupport.h, libcsupport/src/newlibc.c,
	libcsupport/src/no_libc.c, libcsupport/src/unixlibc.c: Eliminate
	vestiges of ticks_per_timeslice controlling newlib reentrancy. The
	parameter was ignored in libc_init().
2008-08-05 16:51:45 +00:00
Ralf Corsepius
df3021ad78 Add prototypes. 2008-07-29 09:25:11 +00:00
Chris Johns
72d2ec4da4 2008-07-03 Chris Johns <chrisj@rtems.org>
* cpukit/libcsupport/include/chain.h: Removed. Use the SAPI
	interface that is supported.

	* cpukit/libcsupport/Makefile.am,
	cpukit/libcsupport/preinstall.am: Remove chain.h header
	references.

	* cpukit/sapi/include/rtems/chain.h,
	cpukit/sapi/inline/rtems/chain.inl: New. A supported chains
	interface.

	* cpukit/sapi/Makefile.am, cpukit/sapi/preinstall.am: Updated to
	include the new chains interface.

	* cpukit/libfs/src/imfs/imfs.h,
	cpukit/libfs/src/imfs/imfs_creat.c,
	cpukit/libfs/src/imfs/imfs_debug.c,
	cpukit/libfs/src/imfs/imfs_directory.c,
	cpukit/libfs/src/imfs/imfs_fsunmount.c,
	cpukit/libfs/src/imfs/imfs_getchild.c,
	cpukit/libfs/src/imfs/imfs_load_tar.c,
	cpukit/libfs/src/imfs/imfs_rmnod.c,
	cpukit/libfs/src/imfs/memfile.c,
	cpukit/libfs/src/nfsclient/src/nfs.c,
	cpukit/libcsupport/include/rtems/libio.h,
	cpukit/libcsupport/src/malloc_deferred.c,
	cpukit/libcsupport/src/mount.c,
	cpukit/libcsupport/src/privateenv.c,
	cpukit/libcsupport/src/unmount.c: Change to the new chains
	interface.

	* cpukit/libcsupport/src/malloc_boundary.c: Remove warning.
2008-07-03 01:37:38 +00:00
Joel Sherrill
5fa5185324 2008-06-06 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c,
	libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-task.c,
	rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemongetstatus.c,
	rtems/src/ratemonperiod.c, score/include/rtems/score/thread.h,
	score/src/threaddispatch.c, score/src/threadinitialize.c,
	score/src/threadtickletimeslice.c: Add typedefs for cpu usage and
	period timing statistics. Also renamed related variables and
	structure members so they are the same whether you are using
	nanosecond (e.g. struct timespec) or ticks (e.g. uint32_t)
	granularity. This lays the groundwork for future cleanup.
2008-06-06 15:44:11 +00:00
Joel Sherrill
393a861dbd 2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/newlibc_exit.c: Only run the fini section on exit if
	the target toolset uses init/fini sections.
2008-06-05 14:33:22 +00:00
Joel Sherrill
83734c9d52 2008-05-27 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/newlibc_exit.c, score/src/threadhandler.c: Call
	fini() as part of exit(). This avoids atexit() being a required
	function.
2008-05-27 16:47:13 +00:00
Thomas Doerfler
bf95ccb506 Added const qualifier to various pointers and data tables to
reduce size of data area.
	IMFS: Fixed creation of symbolic links to avoid a compiler warning.
	DOSFS: Use LibBlock instead of read() to read the boot record.
2008-05-27 10:34:15 +00:00
Thomas Doerfler
e9af8c57c2 Bugfix: String output without width option. 2008-05-27 10:32:38 +00:00
Joel Sherrill
cdc830964a 2008-05-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/termios_baud2index.c,
	libcsupport/src/termios_baud2num.c,
	libcsupport/src/termios_num2baud.c,
	libcsupport/src/termios_setinitialbaud.c: New files.
2008-05-22 20:35:41 +00:00
Eric Norum
d871cf1bc6 Add locks around non-atomic structure assignment. 2008-05-13 20:45:51 +00:00
Joel Sherrill
ad78965db2 2008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am, libcsupport/include/rtems/libio.h: Remove
	rtems_termios_reserve_resources. It is obsolete.
	* libcsupport/src/termiosreserveresources.c: Removed.
2008-04-22 23:24:09 +00:00
Chris Johns
55c64fc9cd 2008-04-12 Chris Johns <chrisj@rtems.org>
* libmisc/shell/shell.c, libmisc/shell/shell.h,
	libmisc/shell/shell_script.c: Add support to echo the commands to
	stdout. This is useful with the -v script option to show commands
	as the run. Also added support to chdir to the directory the task
	invoking the script is in.
	* libmisc/shell/extern-cp.h, libmisc/shell/main_cp.c,
	libmisc/shell/utils-cp.c: Update tro the latest FreeBSD version.
	* libcsupport/Makefile.am, libcsupport/src/fchown.c: Add fchown
	support.
2008-04-11 22:57:54 +00:00
Joel Sherrill
8ac8cb22a9 2008-03-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/gxx_wrappers.c: Add rtems_gxx_mutex_destroy as needed
	by gcc newer than the 4.3 release series.
2008-03-05 03:07:36 +00:00
Joel Sherrill
46dfa1c7ba 2008-02-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/chroot.c: Formatting.
2008-02-28 16:07:57 +00:00
Joel Sherrill
6728035e8b 2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/printk.c: Added width and padding for %s.
	* libmisc/cpuuse/cpuusagereport.c: Support object names that are
	strings longer than 4 chanracters.
2008-02-06 23:15:57 +00:00