Commit Graph

504 Commits

Author SHA1 Message Date
Joel Sherrill
e411dda718 2007-01-09 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/error.c: rtems_progname is no longer defined in
	the BSP startup since it never held a meaningful value.
2007-01-09 21:54:52 +00:00
Ralf Corsepius
63a88eb0bc Regenerate. 2007-01-08 08:43:28 +00:00
Ralf Corsepius
7192476f7a Use size_t instead of uint32_t for read/write count-args. 2006-12-08 07:18:27 +00:00
Ralf Corsepius
7d6701d3b6 Fix typo in yesterday's patch. 2006-11-19 02:17:10 +00:00
Ralf Corsepius
2751cbe005 Use uintmax_t instead of uint64_t for MALLOC_STATS statistics.
Use inttypes.h PRIxXXX macros for printing.
2006-11-18 05:32:29 +00:00
Joel Sherrill
336227dbc3 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/sync.c: Do not dereference NULL reent.
2006-11-17 22:55:05 +00:00
Joel Sherrill
047d67ab25 2006-11-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/termios.c, posix/Makefile.am, posix/preinstall.am,
	posix/include/rtems/posix/config.h, posix/include/rtems/posix/time.h,
	sapi/src/posixapi.c, score/Makefile.am, score/preinstall.am,
	score/include/rtems/score/corerwlock.h,
	score/include/rtems/score/threadq.h,
	score/src/corerwlockobtainread.c, score/src/threadqenqueue.c,
	score/src/threadqtimeout.c: Adding POSIX barriers, POSIX spinlocks,
	and partial implementation of POSIX rwlocks.
	* posix/include/rtems/posix/barrier.h,
	posix/include/rtems/posix/rwlock.h,
	posix/include/rtems/posix/spinlock.h,
	posix/inline/rtems/posix/barrier.inl,
	posix/inline/rtems/posix/rwlock.inl,
	posix/inline/rtems/posix/spinlock.inl,
	posix/src/barrierattrdestroy.c, posix/src/barrierattrgetpshared.c,
	posix/src/barrierattrinit.c, posix/src/barrierattrsetpshared.c,
	posix/src/pbarrier.c, posix/src/pbarrierdestroy.c,
	posix/src/pbarrierinit.c, posix/src/pbarriertranslatereturncode.c,
	posix/src/pbarrierwait.c, posix/src/prwlock.c,
	posix/src/prwlockdestroy.c, posix/src/prwlockinit.c,
	posix/src/prwlockrdlock.c, posix/src/prwlocktimedrdlock.c,
	posix/src/prwlocktimedwrlock.c,
	posix/src/prwlocktranslatereturncode.c, posix/src/prwlocktryrdlock.c,
	posix/src/prwlocktrywrlock.c, posix/src/prwlockunlock.c,
	posix/src/prwlockwrlock.c, posix/src/pspin.c,
	posix/src/pspindestroy.c, posix/src/pspininit.c,
	posix/src/pspinlock.c, posix/src/pspinlocktranslatereturncode.c,
	posix/src/pspintrylock.c, posix/src/pspinunlock.c,
	posix/src/rwlockattrdestroy.c, posix/src/rwlockattrgetpshared.c,
	posix/src/rwlockattrinit.c, posix/src/rwlockattrsetpshared.c: New files.
2006-11-15 14:08:49 +00:00
Ralf Corsepius
43912af4a4 2006-11-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/stdint.h, libcsupport/include/inttypes.h:
	Remove.
2006-11-12 11:12:53 +00:00
Joel Sherrill
5112ff5a88 2006-10-25 Jennifer Averett <jennifer@oarcorp.com>
* libcsupport/src/termios.c: Change attribute of semaphore. It was
	counting interrupts not acting as a condition synchronization mutex.
	Since the caller did not always need to obtain the semaphore, it was
	not being decremented until there was no data. This could occur after
	hours of running a system and thousands of interrupts. The code in
	fillBufferQueue would spin until it had consumed all of those
	semaphore counts.
2006-10-25 11:28:08 +00:00
Joel Sherrill
cf04e8aca9 *** empty log message *** 2006-09-01 19:10:01 +00:00
Joel Sherrill
b3ee778ea9 2006-09-01 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/malloc.c, libnetworking/rtems/rtems_glue.c,
	libnetworking/sys/mbuf.h: Remove warnings -- use uintptr_t or
	properly sized integers.
2006-09-01 15:37:47 +00:00
Joel Sherrill
a009d94459 2006-08-30 Joel Sherrill <joel@OARcorp.com>
* ftpd/ftpd.c, libcsupport/include/sys/ioccom.h,
	libcsupport/src/ioctl.c, libnetworking/kern/uipc_mbuf.c,
	libnetworking/libc/inet_addr.c, libnetworking/net/ethernet.h,
	libnetworking/net/if.c, libnetworking/net/if_ethersubr.c,
	libnetworking/net/if_ppp.c, libnetworking/net/if_pppvar.h,
	libnetworking/net/if_var.h, libnetworking/net/ppp_tty.c,
	libnetworking/netinet/in_cksum.c, libnetworking/nfs/bootp_subr.c,
	libnetworking/rtems/rtems_bsdnet_internal.h,
	libnetworking/sys/mbuf.h, pppd/md4.c, pppd/pppd.h: Remove warnings
	due to improper use of int which shows up on 16 bit targets. Added
	ioctl_command_t since IOCTL command argument does not reliably fit
	into 16 bits.
2006-08-31 01:10:02 +00:00
Joel Sherrill
ae5a79c349 2006-08-30 Joel Sherrill <joel@OARcorp.com>
* libcsupport/include/sys/ioccom.h, libnetworking/kern/uipc_socket2.c,
	libnetworking/net/ethernet.h, libnetworking/net/if.h,
	libnetworking/net/if_ethersubr.c, libnetworking/net/if_ppp.c,
	libnetworking/net/if_pppvar.h, libnetworking/net/ppp_tty.c,
	libnetworking/net/pppcompress.c, libnetworking/net/slcompress.c,
	libnetworking/netinet/in.h, libnetworking/netinet/ip_icmp.c,
	libnetworking/netinet/tcp.h, libnetworking/netinet/tcp_seq.h,
	libnetworking/sys/protosw.h, libnetworking/sys/socketvar.h: Remove
	warnings. Most of the warnings were 16/32 bit integer sizing issues.
	Some constants had L appended, some had casts add, some types were
	changed to reflect a bit width requirement.
2006-08-30 17:20:33 +00:00
Joel Sherrill
48b1e29a7d 2006-08-30 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/utsname.c, libnetworking/libc/res_debug.c,
	libnetworking/net/if_media.h, libnetworking/rtems/rtems_mii_ioctl.c,
	librpc/src/rpc/svc_simple.c: Remove printf format warnings.
2006-08-30 13:18:40 +00:00
Thomas Doerfler
c9b005a9d2 applied patches for PR1117/1118/1119/1120 2006-07-09 10:05:27 +00:00
Ralf Corsepius
b7176bd70c 2006-06-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/cdefs.h: Partial update from freebsd.
2006-06-23 15:33:19 +00:00
Joel Sherrill
f3333d1700 PR 1101/rtems
* libcsupport/src/base_fs.c: Remove extra endif.
2006-06-22 22:27:24 +00:00
Joel Sherrill
1d63ebb9b9 2006-06-22 Joel Sherrill <joel@OARcorp.com>
PR 1101/rtems
	* libcsupport/src/base_fs.c, rtems/src/taskcreate.c, rtems/src/tasks.c,
	score/src/coremutex.c: Remove dead code.
2006-06-22 21:56:13 +00:00
Ralf Corsepius
80c2966f4b 2006-06-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/libio.h: Add extern "C" {}.
2006-06-18 06:28:22 +00:00
Eric Norum
be31de713f Provide customisable mbuf allocation.
Patch from Steven Johnson <sjohnson@sakuraindustries.com>
2006-05-25 17:36:31 +00:00
Joel Sherrill
360d9da616 2006-03-07 Till Strauman <strauman@slac.stanford.edu>
PR 830/filesystem
	* libcsupport/src/termios.c: termios ioctl(FIONREAD) reported wrong
	number of characters. So add chars in low-level/raw buffer to total
	count.
2006-03-07 22:23:15 +00:00
Joel Sherrill
d3490f2756 2006-03-07 Till Strauman <strauman@slac.stanford.edu>
PR 886/filesystem
	* libcsupport/src/libio.c: fcntl(fd,F_GETFL) fails to set O_NONBLOCK if
	the descriptor is in non-blocking mode.
2006-03-07 21:02:45 +00:00
Ralf Corsepius
2eb7d07e17 Regenerate. 2006-01-14 06:20:35 +00:00
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