Commit Graph

831 Commits

Author SHA1 Message Date
Ralf Corsepius
4e971660a1 Remove all-local. 2006-01-12 09:57:43 +00:00
Ralf Corsepius
dbe8e5194c Cleanups 2006-01-12 04:19:28 +00:00
Ralf Corsepius
41f36b57cd include and use inttypes.h. 2006-01-10 21:03:59 +00:00
Joel Sherrill
580f024177 2006-01-08 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/unixlibc.c, libfs/src/imfs/ioman.c: Change
	rtems_io_register_name to take a const char *.
2006-01-08 17:58:43 +00:00
Ralf Corsepius
182c101ede 2005-08-31 Ralf Corsepius <ralf.corsepius@rtems.org>
PR 819/filesystem
	* libcsupport/src/ttyname_r.c: Remove.
	* libcsupport/src/ttyname.c: Partial update from FreeBSD.
	* libcsupport/Makefile.am: Reflect changes above.
2005-08-31 04:29:39 +00:00
Joel Sherrill
b3b78ecffe 2005-08-17 Nickolay Semyonov <snob@oktetlabs.ru>
PR 744/filesystem
	* libcsupport/src/unlink.c, libfs/src/dosfs/msdos_eval.c: DOSFS did not
	support permissions on directories so the check performed by unlink
	would always fail. The unlink code was modified to support a not
	supported status being returned.
2005-08-17 19:11:46 +00:00
Joel Sherrill
c949d6b0d3 2005-08-12 Chris Johns <chrisj@rtems.org>
PR 808/rtems_misc
	* libcsupport/src/printk.c: Fix bug where specifying field width
	crashed on pc386 BSP.
2005-08-12 23:56:16 +00:00
Ralf Corsepius
6d1e301a09 2005-08-02 Ralf Corsepius <ralf.corsepius@rtems.org>
PR 817/rtems
	* libcsupport/src/gxx_wrappers.c: Rename
	rtems_gxx_recursive_mutex_init_function to
	rtems_gxx_recursive_mutex_init.
2005-08-02 12:37:14 +00:00
Eric Norum
51c1867659 Pass along errno from failed ftruncate(). 2005-07-13 02:19:30 +00:00
Joel Sherrill
80f2885b70 2005-05-14 Sergei Organov <osv@topconrd.ru>
PR 746/rtems
	Optimize realloc(). The problem is that realloc() can neither grow
	nor shrink efficiently the current memory region without support
	from underlying heap/region modules. The patch introduces one new
	routine for each of heap and region modules, _Heap_Resize_block(),
	and rtems_region_resize_segment(), respectively, and uses the
	latter to optimize realloc().

	The implementation of _Heap_Resize_block() lead to changing of the
	heap allocation strategy: now the heap manager, when splits larger
	free block into used and new free parts, makes the first part of
	the block used, not the last one as it was before. Due to this new
	strategy, _Heap_Resize_block() never needs to change the user
	pointer.

	Caveat: unlike previous heap implementation, first few bytes of
	the contents of the memory allocated from the heap are now almost
	never all zero. This can trigger bugs in client code that have not
	been visible before this patch.

	* libcsupport/src/malloc.c (realloc): try to resize segment in
	place using new rtems_region_resize_segment() routine before
	falling back to the malloc()/free() method.
	* score/src/heap.c:
	(_Heap_Initialize): change initial heap layout to reflect new
	allocation strategy of using of the lower part of a previously
	free block when splitting it for the purpose of allocation.
	(_Heap_Block_allocate): when split, make the lower part used, and
	leave the upper part free. Return type changed from Heap_Block* to
	uint32_t.
	* score/include/rtems/score/heap.h:
	(Heap_Statistics): added 'resizes' field.
	(Heap_Resize_status): new enum.
	(_Heap_Resize_block): new routine.
	(_Heap_Block_allocate): return type changed from Heap_Block* to
	uint32_t.
	* score/src/heapwalk.c: reflect new heap layout in checks.
	* score/src/heapsizeofuserarea.c: more assertions added.
	* score/src/heapresizeblock.c: new file.
	(_Heap_Resize_block): new routine.
	* score/src/heapfree.c: reverse the checks _Heap_Is_block_in() and
	_Heap_Is_prev_used() on entry to be in this order.
	* score/src/heapallocate.c, score/src/heapallocatealigned.c:
	ignore return value of _Heap_Block_allocate().
	* score/Makefile.am (HEAP_C_FILES): added src/heapresizeblock.c.
	* rtems/include/rtems/rtems/region.h:
	(rtems_region_resize_segment): new interface routine.
	(_Region_Process_queue): new internal routine called from
	rtems_region_resize_segment() and rtems_region_return_segment().
	* rtems/src/regionreturnsegment.c: move queue management code into
	the new internal routine _Region_Process_queue() and call it.

	* rtems/src/regionresizesegment.c: new file.
	(rtems_region_resize_segment): new interface routine.
	* rtems/src/regionprocessqueue.c: new file.
	(_Region_Process_queue): new internal routine containing queue
	management code factored out from 'regionreturnsegment.c'.
	* rtems/Makefile.am (REGION_C_FILES): Added
	src/regionresizesegment.c, and src/regionprocessqueue.c.
	* ada/rtems.adb, ada/rtems.ads: Added Region_Resize_Segment.
2005-05-20 19:15:41 +00:00
Ralf Corsepius
9e7678d2af Partial update from FreeBSD. 2005-05-09 13:12:45 +00:00
Joel Sherrill
abbec0ad3f 2005-05-06 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/termios.c: Removed warnings.
2005-05-06 15:29:57 +00:00
Joel Sherrill
72ba6689b8 2005-05-03 Joel Sherrill <joel@OARcorp.com>
* libcsupport/include/ringbuf.h: Use uint8_t instead of char for raw
	data buffer.
2005-05-03 22:19:04 +00:00
Ralf Corsepius
476114f5e9 Auto-generated update. 2005-02-19 17:08:36 +00:00
Ralf Corsepius
46f507f9c8 Cosmetics. 2005-02-08 17:30:27 +00:00
Ralf Corsepius
6265b83060 Split preinstallation rules in to separate files (preinstall.am). 2005-02-08 15:02:25 +00:00
Ralf Corsepius
6c6ee53029 New. 2005-02-08 14:53:14 +00:00
Ralf Corsepius
a29d2e7e3d 2005-02-04 Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/libio.h: Use rtems_id for semaphores.
	Use char* for buffer.
	* backward/ftpd.h: New.
	* Makefile.am: Reflect having added backward/ftpd.h.
2005-02-04 14:58:01 +00:00
Joel Sherrill
ce92867bea 2005-02-01 Joel Sherrill <joel@OARcorp.com>
* libblock/include/rtems/bdbuf.h,
	libblock/include/rtems/ide_part_table.h, libblock/src/blkdev.c,
	libcsupport/include/rtems/termiostypes.h, libcsupport/src/termios.c,
	posix/macros/rtems/posix/cond.inl,
	posix/macros/rtems/posix/mutex.inl : Remove warnings.
2005-02-02 00:06:18 +00:00
Ralf Corsepius
eb891eb331 2005-01-28 Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/include/inttypes.h: New header guard.
	Fix doxygen preamble.
2005-01-28 08:07:03 +00:00
Ralf Corsepius
7945944459 New header guards. 2005-01-28 08:04:27 +00:00
Ralf Corsepius
05b37c50d0 2005-01-28 Ralf Corsepius <ralf.corsepius@rtems.org>
* itron/Makefile.am, libblock/Makefile.am, libcsupport/Makefile.am,
	libfs/Makefile.am, libmisc/Makefile.am, posix/Makefile.am,
	rtems/Makefile.am, sapi/Makefile.am:
	Remove AM_CPPFLAGS += -I$(top_builddir).
2005-01-28 02:32:38 +00:00
Ralf Corsepius
efec4b0f60 2005-01-27 Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/src/lstat.c, libcsupport/src/readdir_r.c:
	Include config.h.
2005-01-27 13:32:25 +00:00
Ralf Corsepius
e18080ab06 2005-01-27 Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/include/tar.h: New (SUSv3).
	* Makefile.am: Integrate newlib-specific headers.
	Add libcsupport/include/tar.h.
	* libcsupport/Makefile.am: Remove newlib-specific headers.
2005-01-27 06:42:37 +00:00
Ralf Corsepius
a1ec1b9551 2005-01-24 Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/include/stdint.h: Use __PTRDIFF_TYPE for intptr_t.
2005-01-24 15:02:00 +00:00
Ralf Corsepius
1b42bdb6ec 2005-01-18 Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/src/termios.c: Remove unnecessary type casts.
2005-01-18 15:49:32 +00:00
Ralf Corsepius
ab660e7740 Fix typos. 2005-01-14 05:00:55 +00:00
Ralf Corsepius
f49a82f3de 2005-01-13 Joel Sherrill <joel@oarcorp.com>
Ralf Corsepius <ralf.corsepius@rtems.org>

	* libcsupport/src/gxx_wrapper.c: Reflect GCC-4.0's gthr-rtems.h.
2005-01-13 08:25:52 +00:00
Ralf Corsepius
a369ade90d 2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
* httpd/Makefile.am, itron/Makefile.am, libblock/Makefile.am,
	libcsupport/Makefile.am, libfs/Makefile.am, libmisc/Makefile.am,
	libnetworking/Makefile.am, librpc/Makefile.am, posix/Makefile.am,
	rtems/Makefile.am, sapi/Makefile.am, score/Makefile.am:
	Eliminate CFLAGS_OPTIMIZE_V.
2005-01-07 06:05:49 +00:00
Ralf Corsepius
846a4af893 2005-01-01 Ralf Corsepius <ralf.corsepius@rtems.org>
* automake/compile.am, httpd/Makefile.am, itron/Makefile.am,
	libblock/Makefile.am, libcsupport/Makefile.am, libfs/Makefile.am,
	libmisc/Makefile.am, libnetworking/Makefile.am, librpc/Makefile.am,
	posix/Makefile.am, rtems/Makefile.am, sapi/Makefile.am,
	score/Makefile.am, wrapup/Makefile.am:
	Remove build-variant support.
2005-01-01 10:41:29 +00:00
Ralf Corsepius
8f36a34eb4 Remove (Obsolete). 2004-12-29 06:21:50 +00:00
Ralf Corsepius
4d3017ab2d Add doxygen preamble. 2004-12-02 18:04:55 +00:00
Joel Sherrill
9b3f187a02 2004-11-29 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/mallocfreespace.c, rtems/Makefile.am,
	rtems/include/rtems/rtems/region.h, score/Makefile.am,
	score/include/rtems/score/heap.h, score/src/heapgetinfo.c: Add
	capability to return information about just the free blocks in a
	region or heap.  Also changed the semantics of free space available
	to be the largest block of memory that can be allocated.
	* rtems/src/regiongetfreeinfo.c, score/src/heapgetfreeinfo.c: New files.
	: score/include/rtems/score/object.h,
	score/src/objectinitializeinformation.c: Remove warning.
2004-11-29 22:45:43 +00:00
Jennifer Averett
8eaa3eaf8d 2004-11-22 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/ttyname_r.c: Remove warning for using _fstat.
2004-11-22 22:18:49 +00:00
Ralf Corsepius
f10a9991c8 2004-11-20 Ralf Corsepius <ralf.corsepiu@rtems.org>
* libcsupport/include/stdint.h: Move mal-placed comment.
2004-11-20 02:57:19 +00:00
Joel Sherrill
760ccad71b 2004-11-09 Joel Sherrill <joel@OARcorp.com>
* libcsupport/include/stdint.h: Fixed name in @file.
2004-11-09 15:41:04 +00:00
Ralf Corsepius
b6a6bfc448 2004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>
* libcsupport/include/sys/_stdint.h: Remove.
	* libcsupport/include/sys/_inttypes.h: Remove.
	* libcsupport/include/stdint.h: Replace with former sys/_stdint.h.
	Add INT<N>_C, various additions.
	* libcsupport/include/inttypes.h: Replace with former
	sys/_inttypes.h.
	* libcsupport/Makefile.am: Reflect changes above.
2004-11-09 13:20:46 +00:00
Ralf Corsepius
4dd9c71975 2004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>
* libcsupport/include/sys/_stdint.h: Remove.
	* libcsupport/include/sys/_inttypes.h: Remove.
	* libcsupport/include/stdint.h: Replace with former sys/_stdint.h.
	Add INT<N>_C, various additions.
	* libcsupport/include/inttypes.h: Replace with former
	sys/_inttypes.h.
	* libcsupport/Makefile.am: Reflect changes above.
2004-11-09 13:19:36 +00:00
Ralf Corsepius
a0596b415f 2004-11-08 Ralf Corsepius <ralf.corsepiu@rtems.org>
* libcsupport/include/sys/_stdint.h: Remove.
	* libcsupport/include/sys/_inttypes.h: Remove.
	* libcsupport/include/stdint.h: Replace with former sys/_stdint.h.
	Add INT<N>_C, various additions.
	* libcsupport/include/inttypes.h: Replace with former
	sys/_inttypes.h.
	* libcsupport/Makefile.am: Reflect changes above.
2004-11-08 16:11:58 +00:00
Ralf Corsepius
ad58194eb4 Remove. 2004-11-08 16:11:20 +00:00
Ralf Corsepius
47148e4f85 2004-11-07 Ralf Corsepius <ralf.corsepiu@rtems.org>
* libcsupport/include/sys/_stdint.h: Special-case int64_t (GCC has
	__LONG_LONG_MAX__, while POSIX mandates LLONG_MAX. This break
	__EXP(LONG_LONG_MAX)).
2004-11-07 06:49:39 +00:00
Ralf Corsepius
bffdb8281b 2004-11-05 Ralf Corsepius <ralf_corsepiu@rtems.org>
* configure.ac: Remove RTEMS_USES_INTTYPES_H. Require inttypes.h.
	* include/rtems/stdint.h: Remove "wild guesses", require inttypes.h.
	* libcsupport/include/inttypes.h: Cleanup.
	* libcsupport/include/stdint.h: Cleanup.
2004-11-05 11:34:49 +00:00
Ralf Corsepius
07a984b1ad 2004-11-04 Ralf Corsepius <ralf_corsepiu@rtems.org>
* include/sys/_stdint.h: Various changes.
	Add *leastN_t types. Add INTN_{MIN|MAX} macros.
	Add doxygen preamble.
	* include/sys/_inttypes.h: Add doxygen preamble.
	Reflect changes above.
	* libcsupport/include/stdint.h: Add doxygen preamble.
	* libcsupport/include/inttypes.h: Add doxygen preamble.
	* configure.ac: Add doxygen preamble to cpuopts.h.
2004-11-04 21:48:12 +00:00
Ralf Corsepius
e7ab8899cd 2004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>
* configure.ac: Remove -ansi (Cygwin breaks with it).
	* libcsupport/include/stdint.h: Use sys/_stdint.h to setup fixed
	size types.
	* libcsupport/include/sys/_inttypes.h: Add SCN*N macros.
2004-11-01 11:38:18 +00:00
Ralf Corsepius
bf99fe98bf 2004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>
* libcsupport/src/utsname.c: Revert yesterdays patch.
2004-11-01 11:34:41 +00:00
Joel Sherrill
bb6c670153 2004-10-31 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/utsname.c: Fix typo.
2004-10-31 14:08:34 +00:00
Ralf Corsepius
0f9ff45957 2004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>
* libcsupport/include/inttypes.h: #include <sys/_inttypes.h>
	* libcsupport/src/utsname.c: Don't include sptables.h.
	Include <inttypes.h>. Use PRId32 instead of "%d".
2004-10-29 10:34:38 +00:00
Ralf Corsepius
b24b4eb06b 2004-10-28 Ralf Corsepius <ralf_corsepius@rtems.org>
* libcsupport/include/rtems/_inttypes.h: Remove.
	* libcsupport/include/rtems/_stdint.h: Remove.
	* libcsupport/include/sys/_inttypes.h: New.
	* libcsupport/include/sys/_stdint.h: New.
	* libcsupport/Makefile.am: Reflect changes above.
2004-10-29 10:13:02 +00:00
Ralf Corsepius
eafc34b58b 2004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>
* libcsupport/include/rtems/_inttypes.h: Undefine __PRIN defines.
	* libcsupport/include/rtems/_stdint.h: Apply GNUC-limits to GCC >= 3.3, only.
	Add _rtems_*_t_defined defines. Add extern "C".
2004-10-26 17:11:03 +00:00
Ralf Corsepius
a097bd1f86 2004-10-26 Ralf Corsepius <ralf_corsepius@rtems.org>
* libcsupport/rtems/_stdint.h: New.
	* libcsupport/rtems/_inttypes.h: New.
	* libcsupport/Makefile.am: Reflect changes above.
2004-10-26 11:40:17 +00:00