Commit Graph

12806 Commits

Author SHA1 Message Date
uwe
138486a3df According to C99:
6.11.5  Storage-class specifiers

       [#1] The placement of a storage-class specifier  other  than
       at   the  beginning  of  the  declaration  specifiers  in  a
       declaration is an obsolescent feature.

and gcc -Wextra warns about this, so s/const static/static const/
2008-04-29 15:10:02 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos
a8706a45b4 mention ldexp, frexp, modf. 2008-04-27 09:26:20 +00:00
tsutsui
f244f3d606 Use WARNS=1 rather than adding warning options to COPTS.
Tested on several MACHINE_ARCHs.
2008-04-27 03:14:59 +00:00
tsutsui
c007028e0b Enable gcc optimization on m68000 (sun2) again with minimum hacks.
gcc -O0 generates a bit fat binaries.
2008-04-27 03:06:46 +00:00
christos
e1bf490a86 pass a little lint. 2008-04-26 23:49:50 +00:00
christos
6e8524778b Remove 3 functions that exist in libc. This does not break binary compatibility
since we always link with libc.
2008-04-26 19:49:38 +00:00
christos
f5e7bbccfe Put back USE_SHLIBDIR and remove the confusing lint comment that made me
comment it out in the first place.
2008-04-26 19:19:06 +00:00
dogcow
9fdae5aaa5 make this compile again. (hi, xtos!) 2008-04-25 23:51:41 +00:00
christos
98e7e8e9f7 avoid shadow variables, and enable lint. 2008-04-25 22:21:53 +00:00
ginsbach
b876d7a7df Add %F the ISO 8601 date format which is equivalent to %Y-%m-%d. This
format character is supported for reasons of symmetry with strftime(3).
FreeBSD and GNU versions of strptime(3) both support %F.
2008-04-25 20:51:10 +00:00
christos
c9cdc30221 - always check malloc results
- don't leak fds on error
- don't cast malloc
- don't cast NULL
2008-04-25 17:44:44 +00:00
christos
eaacd42b0f I don't see why we need to strong alias those. Nothing else does it. 2008-04-25 16:43:00 +00:00
ginsbach
52de4d6274 Change date for previous change (addition of %Z). 2008-04-25 14:37:00 +00:00
ginsbach
43e9d46aab Add support for %Z ala FreeBSD and some other strptime(3) implementations.
Reviewed by christos.
2008-04-24 21:34:48 +00:00
plunky
043900c0cb constify dirname(3) and basename(3) 2008-04-23 07:53:26 +00:00
plunky
f983e71d70 constify uuid(3) 2008-04-23 07:52:32 +00:00
rmind
4000aba309 Add posix_madvise(2) and appropriate definitions in sys/mman.h header.
This interface is identical to madvise(2), however, is defined by POSIX.
Partially sync madvise(2) man page with FreeBSD.

Reviewed by <mrg>.
2008-04-22 10:42:16 +00:00
dogcow
690e5f1c0b add matching END(). found via -Wa,--fatal-warnings 2008-04-22 04:47:44 +00:00
veego
0f11cf3c0e ${gen_files} was splited into:
${gen_files_k5} ${gen_files_cms} ${gen_files_rfc2459}
 ${gen_files_pkinit} ${gen_files_pkcs12} ${gen_files_pkcs8}
 ${gen_files_pkcs9} ${gen_files_digest} ${gen_files_kx509}
Change CLEANFILES to reflect that change.
2008-04-21 21:30:59 +00:00
plunky
7c3f385475 correct cut and paste error in uuid_dec_be(); le16dec -> be16dec 2008-04-19 18:21:38 +00:00
lukem
e11ffebb07 Document the callback API used by "standard" functions.
NOTE: some of these will be changing in the future to be more
consistent with the technique used in the group & passwd backends.
I'm just documenting the existing behaviour.

Be more consistent when using certain terms.
Rename some variables to reduce confusion.
2008-04-19 08:24:45 +00:00
lukem
e39aac16df Add a missing const. 2008-04-19 07:56:34 +00:00
garbled
6f4524c1a6 Fix a stupid typo in a comment. Pointed out by Juergen Hannken-Illjes. 2008-04-18 08:05:05 +00:00
garbled
1ad3697abd Back out the ppc assembler changes for memcpy/memmove/memcmp on evbppc.
It breaks the explora because the cpu (403) cannot deal with unaligned
accesses.  Reported by Juergen Hannken-Illjes.
2008-04-18 05:34:04 +00:00
apb
01a2b8e8ab Clarify the range of the result from toascii. 2008-04-17 16:41:00 +00:00
apb
576ccca3eb When given negative inputs, isascii returns false. Clarify that
it checks for the range 0 to 127, not "less than or equal to 0177".
2008-04-17 16:40:20 +00:00
apb
a754895afc Refer to the CAVEATS section of ctype(3) for more information. 2008-04-17 16:25:36 +00:00
apb
bafb5bb96d * Expand the CAVEATS section with a lot more detail on how to safely
use the ctype functions.
* Use toupper((int)(unsigned char)*s)) instead of just
  toupper((unsigned char)*s) in an example.
2008-04-17 16:24:40 +00:00
mlelstv
30bf1b0457 If we build with tools the util functions are provided by libnbcompat. 2008-04-15 21:50:22 +00:00
jdc
e78f48a7d8 Add getwin and putwin mlinks. 2008-04-15 18:27:01 +00:00
jdc
a5d694a48c Remove unused BUGS section header. 2008-04-14 21:29:30 +00:00
jdc
9614bd680e Cross reference curses_fileio(3).
Bump date.
2008-04-14 21:26:16 +00:00
jdc
51d1151ffe Document termattrs(), term_attrs(), putwin() and getwin() 2008-04-14 20:41:34 +00:00
jdc
e4b4dc6765 Add new file IO functions.
Define DISABLE_WCHAR, so that we can build without HAVE_WCHAR.
2008-04-14 20:41:17 +00:00
jdc
b93705abe5 Add new file IO functions. 2008-04-14 20:40:53 +00:00
jdc
e501372810 File IO functions header file. 2008-04-14 20:40:37 +00:00
jdc
6dbdc40c87 Increment minor for getwin()/putwin() addition.
Document fileio.h regeneration.
2008-04-14 20:39:58 +00:00
jdc
4c71b79a6f File IO functions getwin() and putwin().
Should fix PR lib/24928.
2008-04-14 20:38:45 +00:00
jdc
d5966065f3 Header (fileio.h) generation script for file IO functions. 2008-04-14 20:35:23 +00:00
jdc
4dd5a997bc Add FILEIO ctrace definition.
Remove unneeded function.
2008-04-14 20:34:36 +00:00
jdc
619b7f0eeb Make this compile when HAVE_WCHAR is not defined. 2008-04-14 20:33:59 +00:00
jdc
5b4df340df Remove unused code.
Only change the scrolling region if the window now has fewer rows.
2008-04-14 20:33:41 +00:00
jdc
dfc45432ab Make __subwin() static. 2008-04-14 20:33:15 +00:00
jdc
e44c226e62 Add extra debugging information. 2008-04-14 20:32:53 +00:00
jdc
afd69f437c Make this compile when HAVE_WCHAR is not defined. 2008-04-14 19:46:42 +00:00
mlelstv
2d48227561 add generated file krb_err.h to cleanup list 2008-04-13 21:29:15 +00:00
mlelstv
61416e545f provide efunctions with libutil for builds without libnbcompat 2008-04-13 21:26:59 +00:00
mlelstv
810864c97f make clean target remove all generated files 2008-04-13 21:25:14 +00:00
dholland
052fb4c32d Fix replicated typo 2008-04-13 02:04:31 +00:00
njoly
3c71964512 Fix _SC_MQ_OPEN_MAX/_SC_MQ_PRIO_MAX sysctlgetmibinfo calls.
The corresponding sysctl nodes are available under kern.mqueue tree.
2008-04-09 18:37:04 +00:00
lukem
a699245e9a The ns_mtab.mdata is passed to the ns_mtab.method as the cbdata argument. 2008-04-07 13:25:42 +00:00
lukem
7ce7cf535a Improve description of the arguments and return values of
various methods & callbacks.
Improve markup.
2008-04-07 13:20:44 +00:00
christos
7ef0806c7f bump for 5.0 2008-04-06 23:39:48 +00:00
christos
4652e1fb8f bump minor. 2008-04-05 23:53:26 +00:00
christos
0cb4d42e16 add EL_REFRESH for the benefit of readline 2008-04-05 15:53:28 +00:00
rtr
f2575a3983 whitespace fix 2008-04-05 08:01:54 +00:00
christos
3bbc95f39d Add rl_forced_update_display() from Gerry Swislow 2008-04-04 21:18:34 +00:00
jmmv
53501bc8e0 Improvements and fixes from J. Vicente Carrasco sent by private mail. 2008-04-03 10:47:27 +00:00
drochner
b5e4e50433 remove stale declarations 2008-04-01 19:19:33 +00:00
chris
c82cfbf571 Use SYSTRAP macro, rather than inlining the swi instruction.
This makes sure the SWI will be in the NetBSD assigned range of swi
numbers.
2008-03-30 21:22:05 +00:00
joerg
a92488c994 Update for libarchive-2.5.0b. 2008-03-30 05:32:16 +00:00
mlelstv
1155fc6c2d add <der.h> header used by external software. 2008-03-29 19:58:37 +00:00
wiz
18ba1efdd8 Install /usr/include/gssapi.h; this file is needed since applications
using Heimdal expect ``#include <gssapi.h>'' to work in combination
with the ``krb5-config --cflags'' output.

Ok mlelstv.
2008-03-29 17:51:42 +00:00
dholland
5b571a159f Add a note clarifying that getprogname() results are not trustable in a
setugid environment. Prompted by PR 38327 discussion.
2008-03-29 16:51:40 +00:00
he
c2dbd6e374 Make this build again. 2008-03-28 00:56:54 +00:00
christos
23b2e3cd80 Fix another integer overflow issue discovered by Maksymilian Arciemowicz.
On top of this, limit the range of getnumber to 0x00ffffff to make sure
that adding two of them does not cause an integer overflow.
2008-03-27 21:50:30 +00:00
jdc
35ce34ed43 Don't define HAVE_WCHAR if DISABLE_WCHAR is defined.
Pointed out by martin@.
2008-03-24 16:57:28 +00:00
tnozaki
690d9c4d8a add comment about renaming of setlocale -> __setlocale_mb_len_max32. 2008-03-24 12:54:38 +00:00
yamt
7f068c6aa5 mention fpos_t 2008-03-23 15:33:26 +00:00
ad
ecdd2c2965 Cheat and add inlines for _atomic_cas_ptr() to work around gcc emitting
unneeded PIC stuff in mutex_lock() and mutex_unlock(), when a thread
register is used.
2008-03-22 17:59:12 +00:00
ad
783e2f6db5 Back out previous. It seems to expose another bug in libpthread/libc,
potentially errno being used before threading is up and running.
2008-03-22 14:19:27 +00:00
mlelstv
2370a334ab Import Heimdal-1.1
more missing files
2008-03-22 09:29:55 +00:00
mlelstv
b0f88a0388 Import Heimdal-1.1 2008-03-22 08:36:48 +00:00
christos
ab6254493d Don't coredump on out of memory conditions. This solution leaks, but gdtoa
is too complicated to fix. Try printf %99999999999.9999999999f 2
2008-03-21 23:13:48 +00:00
ad
159f554369 Move pthread__errno() into pthread_specific.c so it gets the "no stack
frame" treatment.
2008-03-21 21:35:43 +00:00
jdc
915ba4ba52 Increment libcurses minor version (termattrs() and term_attrs() added). 2008-03-21 13:43:36 +00:00
jdc
805ac24bda Add termattrs() and term_attrs().
Order the descriptions so that functions handling normal and functions
handling wide attributes are grouped together.
2008-03-21 13:43:17 +00:00
jdc
1ac1993d5c Add termattrs() and term_attrs(). 2008-03-21 13:42:50 +00:00
jdc
56a23c4b24 Add termattrs() and term_attrs().
Conditionally define HAVE_WCHAR, so that userland programs can see wide
definitions and functions.
2008-03-21 13:42:39 +00:00
jdc
80b229386d Add termattrs() and term_attrs() (requested by wiz@).
Only allow standout and underline if the terminal can do them.
2008-03-21 13:41:49 +00:00
mhitch
f8f1643217 Fix weak alias. 2008-03-20 18:49:39 +00:00
mhitch
83e4fa69d9 Add wrappers for missing coshf(), expf(), logf(), sinhf(), atan2f(), and
hypotf() functions for vax.  Play the namespace and weak alias game for
functions used internally by the complex functions.  Should fix the vax
build of libm.
2008-03-20 16:41:26 +00:00
pooka
73bad8cbdb Reserve enough memory for ops which return more than they receive. 2008-03-20 15:28:03 +00:00
tnozaki
7ed5b48246 add BOM to utf-16/32 stream in case that endian is not specified,
like other iconv implementation, GNU libiconv, glibc2 iconv, perl iconv.
2008-03-20 11:47:45 +00:00
lukem
235fbd4ecb pam_group needs libutil & libcrypt 2008-03-20 02:19:48 +00:00
plunky
1099c15782 add structure definitions relating to Personal Area Networking profiles
(from FreeBSD)
2008-03-19 23:13:21 +00:00
bjs
0b40e16c9a Change version suffix back to 1.1 at request of christos@@ so that
users know whether or not their library has the security
vulnerability.
2008-03-19 17:10:52 +00:00
he
0db6a6b023 When compiling for _STANDALONE, omit a bunch of headers which aren't really
needed and which trigger build problems.

(These two files should probably be unified and put under common/...)
2008-03-18 20:11:43 +00:00
christos
00f5c7fe8d Avoid integer overflow; reported by Maksymilian Arciemowicz. 2008-03-18 18:16:08 +00:00
christos
0738e9e28d no more texinfo files. 2008-03-18 14:48:39 +00:00
wiz
636a4f58a9 Describe how to portable extend a file. From joerg. Bump date. 2008-03-16 11:33:40 +00:00
bjs
22c6c5ebca s/prototyoe/prototype/ 2008-03-15 20:18:20 +00:00
rearnsha
00f0061ae9 ARM/Thumb interworking support 2008-03-15 10:46:24 +00:00
christos
749de7f2a4 Since _file is a short, check that the fd fits in it, otherwise bail with
EMFILE. We treat _file as an unsigned short to double our range, with a
special case for -1 (closed). Make a note of what we should do about stdio
if we ever bump libc. We could change _file in the future compatibly to an
int by putting it in the extension space but for now we don't bother.
2008-03-13 15:40:00 +00:00
mrg
3db9261484 don't need <sys/tty.h> here. 2008-03-12 05:57:28 +00:00
joerg
d134e844b3 libform and libmenu need libcurses. 2008-03-12 00:21:29 +00:00
joerg
cb41266e10 Depends on libcurses. 2008-03-11 23:06:04 +00:00
rmind
38b8e432cc Add "This API is expected to be compatible with the APIs found in Solaris and
HP-UX operating systems" into the STANDARDS section, as discussed with <wiz>.
2008-03-11 18:09:40 +00:00
rmind
1c7eae5598 Use size_t to avoid overflow when sorting large arrays. While here, ANSIfy.
Obtained from FreeBSD (das@).
2008-03-11 18:04:59 +00:00
rmind
f67f2ea584 Add pset(3) manual page, and appropriate links.
Thanks <wiz> for review and fixes!
2008-03-10 19:00:21 +00:00
he
71ca0c37fa As mrg@ informs me, delay slots are indented 1 and not 2 spaces. 2008-03-10 18:31:08 +00:00
he
bbed82985f Fix the problem that CURBRK can't be referenced directly via R_SPARC_GOT13
here anymore (apparently libc grew too big).  Use sethi and %hi/%lo instead.
2008-03-10 18:28:43 +00:00
rmind
2ac12931eb Add sched(3) manual page, and appropriate links.
Thanks <wiz> for review and fixes!
2008-03-10 14:47:06 +00:00
wiz
388f16d85b Move previously added sentence to STANDARDS section, as suggested by yamt. 2008-03-10 12:25:55 +00:00
wiz
4111fbb94d Mention that extending files with truncate is a POSIX extension.
Requested by joerg.

Bump date.
2008-03-10 11:47:28 +00:00
lukem
da757a063f Style tweaks:
* test defined(HAVE_foo) not just HAVE_foo
* replace u_foo with unsigned foo
* the whitespace change whose name we dare not mention
2008-03-10 01:18:44 +00:00
drochner
33e5dbb818 fix so that it doesn't interact strangely with ARCH_SRCS definitions
in the base Makefile, makes the lib built correctly again for eg amd64
(seen by wiz)
2008-03-08 14:21:41 +00:00
ad
61f666ba09 _pthread_rwlock_held_np: if write locked, only return true if held by
the current thread.
2008-03-08 13:46:59 +00:00
yamt
b82fd04ee9 sysconf: cache the result of _SC_PAGESIZE. 2008-03-08 13:34:40 +00:00
ad
eceac52f08 Complain if _lwp_ctl() fails. 2008-03-08 13:23:13 +00:00
ad
8b2c109b14 Add a cast to make lint happy. 2008-03-08 13:22:22 +00:00
ad
91224074af Redo the CPU-based arena selection slightly differently. With the latest
libpthread and kernel, this mysteriously works without a problem.
2008-03-08 13:17:13 +00:00
ad
55faac1242 pthread_key_create: instead of using a simple 1/0 value to record a key
as allocated, use an array of pointers and save __builtin_return_address(0)
so keys can be identified when doing post-mortem debugging.
2008-03-07 22:27:07 +00:00
ad
8548e33886 pthread__mutex_lock_slow:
- don't stop spinning if there are already waiters on the mutex, there is
  no point.
- cosmetic change.
2008-03-07 22:23:57 +00:00
joerg
c3302ae742 Regen to get HAVE_FSTAT. 2008-03-07 20:10:55 +00:00
ad
1046045268 Keep one builtin slot so that pthread initialization doesn't need to use
malloc().
2008-03-07 17:56:39 +00:00
cube
c6726d686a Bump libprop's minor after addition of prop_dictionary_make_immutable. 2008-03-05 07:55:36 +00:00
tnozaki
47d7f820fd bin/38047 fix bad prototype for function mbrlen
reported by cheusov AT tut DOT by, thanks!
2008-02-28 19:36:51 +00:00
christos
908cf676a4 mention RANDOM_MAX 2008-02-28 16:16:35 +00:00
ad
0565241b89 +#define _KERNEL
+#include <sys/types.h>
+#undef _KERNEL
2008-02-27 15:46:23 +00:00
joerg
d59870515d Build with WARNS=4. 2008-02-26 15:42:29 +00:00
joerg
76f009d25d Update build infrastructure for libarchive-2.4.13. 2008-02-26 14:54:18 +00:00
xtraeme
c3e906d7a0 There's no need to do the mutex_trylock dance anymore in __cxa_finalize(),
just using mutex_lock() is enough.
2008-02-25 14:35:54 +00:00
xtraeme
1b5143aa5d Add a comment for __libc_atexit_init() missed in previous that was
available in the original patch.
2008-02-25 14:15:10 +00:00
xtraeme
95157b046e Make the atexit mutex recursive and initialize it in __libc_init()
as suggested by ad@, based on the patch provided by Sverre Froyen
in lib/37654.

Reviewed by ad@ and jmcneill@.
2008-02-25 14:06:13 +00:00
christos
972b0b15b4 doecument that we now can return eagain. 2008-02-24 21:55:45 +00:00
oster
8b2eb1e024 Add the missing 'n' to 'correspoding'. 2008-02-23 18:35:04 +00:00
sborrill
b701bbf89d Fix tiny typo 2008-02-23 17:53:23 +00:00
christos
6711b9aec7 use the proper variable. 2008-02-23 15:53:22 +00:00
christos
8fbaff1005 fix lint issues. 2008-02-23 15:18:04 +00:00
ad
6869216239 Fix pthread_mutex_trylock() for recursive mutexes. PR lib/38087.
Based on a patch provided by rafal@.
2008-02-23 15:15:57 +00:00
joerg
758ec1af13 Also cast before anding the characters. 2008-02-22 19:25:59 +00:00
christos
5b9284aa07 GLOB_NO_DOTDIRS patch from mouse@
Fixes re-definition of GLOB_PERIOD.
2008-02-22 18:33:51 +00:00
joerg
966f3cc69d Add some explicit casts to stop GCC complains about signed char shifts. 2008-02-22 14:40:15 +00:00
joerg
2ca83a6a31 Replace O(nm) versions of strspn, strcspn and strpbrk with O(n+m)
implementations based on the suggestions I made for DragonFly's libc
ages ago. For charset with more than one entry and iterating over the
first two characters of s, this is consistently faster on amd64.
2008-02-22 13:32:19 +00:00
garbled
f908c50890 Make use of ppc tuned assembler. 2008-02-21 17:37:00 +00:00
drochner
c7a43da627 Add manpages for the complex math functions, originally from SUSv3,
roff source from the Linux documentation project.
Modifications before import:
-added NetBSD RCS ID
-removed Linux PROLOG and declarations with "long double"
-ran the "deshallify" script as required by The Open Group
Split out complex related things into an own Makefile fragment.
Thanks to hubertf for directions.
2008-02-20 09:55:37 +00:00
tnn
26fe2af07d minor pedanticism about glibc. Suggested by Joerg. 2008-02-16 17:45:39 +00:00
ad
377f098ab0 Adjust mutex/rwlock definitions to match reality now that there is only
one implementation of each. PR lib/38030.
2008-02-14 21:40:51 +00:00
tnn
c4bfcd4e81 Add a history section and a compatibility section. 2008-02-14 18:08:35 +00:00
rillig
e477e0fd7c I tried to add a partition to the swap space that wasn't marked as swap
partition, and I got ENXIO. Since the existing description didn't apply
to this case, I added another.
2008-02-13 11:10:31 +00:00
rillig
ae9e303fcf Aligned the text of ENXIO with the one in gen/errlist.c. 2008-02-13 10:48:18 +00:00
drochner
58cba952a0 remove a stale __weak_alias (code went into the compat section) 2008-02-12 19:36:06 +00:00
ad
a67e1e3475 - Remove libpthread's atomic ops.
- Remove the old spinlock-based mutex and rwlock implementations.
- Use the atomic ops from libc.
2008-02-10 18:50:54 +00:00
ad
749400b704 Crank minor for atomic ops. 2008-02-10 18:47:06 +00:00
ad
b5b3e9fb51 Enable the atomic ops in userspace. 2008-02-10 18:45:40 +00:00
ad
9c43df3853 We've got the priority/class stuff now. 2008-02-10 14:52:05 +00:00
junyoung
a81d5c256d __attribute__((__packed__)) -> __packed. 2008-02-10 05:58:22 +00:00
yamt
603e4b9abd update for _sched_{get,set}param changes. from rmind@. 2008-02-09 17:01:51 +00:00
junyoung
f59892f81b u_intXX_t -> uintXX_t. 2008-02-09 14:56:20 +00:00
jmmv
2630bb2c25 Document dehumanize_number(3). 2008-02-09 09:09:04 +00:00
dholland
c60100b138 Use STDIN_FILENO and friends instead of magic constants 0/1/2.
Suggested by the patches in PR bin/36551 from Greg A. Woods.
2008-02-09 05:07:26 +00:00
dholland
3ad5f9069e Document the behavior of dup2 when oldfd == newfd: nothing happens.
Suggested by the patches in PR bin/36551 from Greg A. Woods.
2008-02-09 04:58:30 +00:00
mrg
d638eaddc1 m68k/Makefile.inc:
- add __mmap.S to SRCS.
- add _lwp_getprivate.S mremap.S to ASM.
sys/Makefile.inc:
- look for __glue.S as well as glue.S.
- introduce a new ASM_MD and set it to "_lwp_getprivate.S mremap.S".
  this is used for assembler files that may have non-default
  implementations.

now m68k and m68000 mostly build again.
2008-02-09 02:41:06 +00:00
mrg
ecc90aa046 make all sun2 use -O0 and move most of the hacks out into just 3 files. 2008-02-09 02:37:21 +00:00
mrg
b757a71702 only use -Wuninitialized with -O>0. 2008-02-09 02:36:12 +00:00
elad
5c80416b17 PR/37962: Andrew Doran: libkvm is busted due to kauth_cred redefinition
Sync structure with kernel version.
2008-02-05 15:56:01 +00:00
mrg
e6f4791d95 make sun2 build again with liberal use of -O0. 2008-02-05 02:41:15 +00:00
rtr
1db9feaaa0 fix comment Abtract -> Abstract 2008-02-04 23:08:01 +00:00
jmmv
bd40f72cd9 Adjust for atf 0.4: add new files and adapt configuration. 2008-02-04 20:32:11 +00:00
christos
ed13fe5855 fix posix_memalign; we are not going to support alignments > pagesize in
this implementation.
2008-02-03 22:56:53 +00:00
christos
708c364c0e namespace protection for csetexpandtc() 2008-02-02 22:06:34 +00:00
christos
0d149bc5fe Add csetexpandtc() 2008-02-02 20:56:46 +00:00
christos
a0e4739ced PR/37932: Yakovetsky Vladimir: build distribution with USE_FORT fails
Avoid read redefinition
2008-02-02 17:09:29 +00:00
christos
56709adfc9 Try to fix previous commit of /.. and /. handling for GLOB_PERIOD. I will
write a regression test for this.
2008-02-01 23:29:54 +00:00
ad
d8251138f4 pthread_rwlock_wrheld_np: return true only if locked by the calling thread. 2008-01-31 11:50:40 +00:00
mlelstv
58dedb340c use the correct symbols 2008-01-31 10:07:09 +00:00
apb
9eaab5ee00 Mention use of /var/run/dev.db, and add .Xr dev_mkdb 8 .
Could somebody update the HISTORY?
2008-01-30 19:24:59 +00:00
pooka
04973f7441 When reading a request from the kernel, only allocate as much memory
as needed to read a request instead of the maximum message size.
Insanely enough, this makes "cheap backend I/O" file systems such
dtfs and sysctlfs perform 10-30% better (depending on the average
size of incoming requests).
2008-01-29 14:54:08 +00:00
abs
e26de9edf5 Adjust "The getpeereid() function appeared in NetBSD 4.0" to a more
correct NetBSD 5.0.
2008-01-29 13:55:27 +00:00
pooka
98d94502be whoops, bump date - pretty significant change 2008-01-29 10:15:50 +00:00
pooka
be5ed87c1e Fix a weirdosity in the framebuf gotfb interface: hand buffer
ownership to the called routine instead of keeping it.  This means
that callees must now destroy the buffer once they are done with it.
2008-01-29 10:07:29 +00:00
pooka
704ded372f Don't add asserts between testing and commit - especially not
if you're going to write "assert(foo = 0)"
2008-01-28 18:51:03 +00:00
pooka
7c2ddc1d53 Bump version for lazy contexts (probably not necessary, but it's
been a long time since I bumbed the version ;)
2008-01-28 18:42:09 +00:00
pooka
d1d05d65b9 Implement lazy contexts for file systems using puffs_mainloop().
Previously each request was executed on its own callcontext and
switched to every time the request was being processed.  Now requests
borrow the mainloop context and switch only if/when they yield.
This takes two context switches away from a file system request
bringing down the typical amounts 2->0 (e.g. dtfs) and 4->2 (e.g.
psshfs).

The interfaces for manually executing requests changed a bit:
puffs_dispatch_create() and puffs_dispatch_exec() must now be used.
They are not tested, as nothing in-tree wants them and I doubt
anyone else is really interested in them either.

Also do some misc code cleanup related to execution contexts.  The
"work-in-progress checkpoint" committed over a year ago was starting
to look slightly weed-infested.
2008-01-28 18:35:49 +00:00
christos
ef1144e6de Always try both tcp and udp, trying first the one specified by the protocol
wanted.
2008-01-28 01:10:22 +00:00
christos
dedb237183 Remove static module defines; they are done in openpam.h now. 2008-01-27 20:26:56 +00:00
martin
29ef53c683 libc part of posix_fadvise changes.
The new compatibility stub is ABI compatible to the old syscall, so no
need to bump libc minor.
2008-01-27 16:18:22 +00:00
christos
9d58de27f0 Install a new include file. 2008-01-27 01:27:05 +00:00
christos
4466f6b5f6 Fix compilation 2008-01-27 01:23:20 +00:00
pooka
e9ff674b00 For operations with a target (remove, rmdir, link), print the
target cookie.
2008-01-27 00:29:24 +00:00
rmind
b5e9addd22 sched_setparam: fix the case when incorrect (according to the class)
in-kernel priority is used.  Reported by <drochner>.

Minor fixes for scheduling calls to conform the POSIX:
- If pid is equal to zero, use the calling process;
- In case of permission problem, return EPERM instead of EACESS;
- sched_setscheduler() should return previously used policy;
- pthread_* calls should return the error code or zero;

Should fix the namespace problems (and builds of some packages):
- Move cpuset_t defintion from pset.h to sched.h;
- Remove the #include of pset.h in pthread.h;
2008-01-26 17:55:29 +00:00
christos
a1e4f75af9 PR/37864: Wolfgang Stukenbrock: when requesting TCP rcp-service port numbers
UDP is used
2008-01-25 19:43:53 +00:00
rafal
2e86943de9 Make this compile after Andrew's fix (remove now-unused variables) 2008-01-25 02:12:10 +00:00
ad
bba572530b pthread_mutex_lock_slow: remove "deliberate deadlock" code that's not
needed with 1:1. PR lib/37524.
2008-01-25 01:09:18 +00:00
christos
8c03790350 remove redundant check. 2008-01-20 04:56:08 +00:00
weinem
0b27d36fa7 Fixes the wrong reference to s_time(1), which should be openssl(1). Closes PR misc/29998. Fix proposed by Igor Sobrado 2008-01-20 03:19:49 +00:00
christos
19884cbfe6 s/set/test/ 2008-01-19 16:05:34 +00:00
christos
f2df27b721 only include <sys/pset.h> if _NETBSD_SOURCE 2008-01-19 16:03:48 +00:00
ginsbach
0d03389c52 Treat input "0x" as invalid and return INADDR_NONE. Inspired by
FreeBSD-PR 92880.
2008-01-19 03:46:52 +00:00
martin
3049bc6660 Use the new information about per-cpu mappings. Gdb now can examine
the interrupt stack.
2008-01-18 16:26:09 +00:00
christos
4e783482fa Fix off-by-one buffer overflow. VU#203611, CVE-2008-0122 2008-01-18 16:20:57 +00:00
christos
00f5cbb6dc From Richard M Kreuter: GLOB_PERIOD fix for trailing ./ or ../ 2008-01-18 16:20:00 +00:00
pooka
c142350bc6 Fix fakecc case.
Noticed by Pavel Jirout on current-users
2008-01-17 17:43:14 +00:00
pooka
9f5abca72f Comment out the puffs_executor hacks for now, they have races.
The issue should be solved in another fashion anyway.
2008-01-16 23:17:43 +00:00
pooka
614c59fcb2 Cache a number of execution contexts instead of re-initializing
them every time.  Speeds up pure in-memory file systems such as
sysctlfs or dtfs quite a bit.  For actual I/O-workhorses the result
is of course less tasty.
2008-01-16 21:29:59 +00:00
ad
bbc79e58a6 Pull in my modules code for review/test/hacking. 2008-01-16 12:34:50 +00:00
pooka
3a433fe13b Use PROT_NONE page to protect bottom of stack from overrun 2008-01-16 00:29:42 +00:00
ad
eba222df68 ... and make kvm_dump_inval() work on the raw device. 2008-01-15 14:16:30 +00:00
ad
a7a2d171df Handle reading from raw disk devices. 2008-01-15 13:57:41 +00:00
rmind
5c71a4d49f Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.
2008-01-15 03:37:10 +00:00
pooka
86499e8154 Remove puffs_ops from fuse_operations, no reason for it to be there. 2008-01-14 20:46:11 +00:00
pooka
aa3b40df48 return -ret from statfs 2008-01-14 16:07:00 +00:00
pooka
d7412d56b1 Introduce PUFFS_STACKSIZE_MIN to avoid overloading 0 and getting
a warning from the library when really wanting to say "just the
minimum, please".
2008-01-14 13:57:26 +00:00
simonb
ccab3b34ce Remove support for NetBSD/pc532. 2008-01-10 13:40:36 +00:00
elad
e7f75b7de6 PR/35562: khorben at defora dot org: Potential denial of service when
listing files on an NFS share

Limit the number of retries as suggested in the PR.

Reviewed by and okay fvdl@.
2008-01-10 09:49:04 +00:00
martin
8f4340d1d4 Modify the high part of the fraction so that we recognize our __infinityl
value.
XXX - seems like we could share this with LE archs
2008-01-10 00:34:27 +00:00
simonb
d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
christos
c6409540ef add missing static decls. 2008-01-08 20:56:08 +00:00
christos
6c924f05f9 cast -1 to unsigned int. 2008-01-08 20:55:58 +00:00
christos
72f5cf0283 no semis after weak alias. 2008-01-08 20:55:25 +00:00
pooka
1309a27c5e liberate gas-huffin crack-puffin' assert 2008-01-08 00:22:31 +00:00
yamt
48a1e4cf46 pthread_curcpu_np: map LWPCTL_CPU_NONE to 0 so that this works in the case
of _lwp_ctl failure.
2008-01-07 11:51:43 +00:00
christos
5f01dfbd0d PR/37708: A.Leo.: getservbyname, segetaddrinfo sefgfaults when user has no
rights for reading ``/etc/services''
2008-01-06 16:34:18 +00:00
christos
9780e68402 warns=4 2008-01-05 20:00:49 +00:00
jld
1717a7fe75 Add address translation support for 4MB pages, which we use to map the
kernel text.
2008-01-05 06:54:12 +00:00
jld
324e44d74f The address translation routine needs to use the plN_pi macros (for
indexing into the PTP), not the plN_i ones (for indexing into the entire
linear page table); cf. the analogous code for amd64.  Fixes ~everything
to do with kernel core dumps on i386.
2008-01-05 06:22:55 +00:00
ad
b43749fde1 machine/lock.h, not sys/lock.h 2008-01-05 01:37:35 +00:00
christos
aa33183605 Simplify and check for snprintf() error. 2008-01-03 04:26:27 +00:00
pooka
cf16702d95 fix pasto 2008-01-02 18:11:01 +00:00
pooka
b181a1a237 Also pass fromname in the "distributed" case. 2008-01-02 17:57:51 +00:00
pooka
636e495315 Provide some transparent "support" for "distributed" file systems.
If the env variable PUFFS_COMFD is set, the descriptor value
contained in it is used for communication instead of opening
/dev/puffs and doing mount(2).

This feature is obviously very undocumented and should not be used
without adult supervision.
2008-01-02 14:27:42 +00:00
christos
8bb176858f block signals before playing with files. From Anon Ymous 2008-01-01 21:22:55 +00:00
chris
cf792ccc84 Update libkvm to be able to deal with arm kernel core dumps.
These changes allow savecore to successfully save a kernel core dump.

Final part of fixing PR cats/18026
2008-01-01 14:10:37 +00:00
martin
e094ff6106 Add missing stubs for syscalls returning addresses.
We can now run on a kernel that does not copy the syscall return value
to register A0.
As discussed in PR port-m68k/37631.
2007-12-31 07:39:19 +00:00
martin
93310937f3 Avoid munmap(-1, ...) - doesn't make much sense. 2007-12-28 00:39:32 +00:00
pooka
38a05cc07d Flesh this out a bit more. Unfortunately it's still unfinished,
and I don't know when I'll get a chance to finish it.
2007-12-27 18:50:42 +00:00
pooka
cb36cc5493 Uncommit accidentally committed PUFFS_FLAG_OPDUMP.
overextensive library verbosity noticed by riz
2007-12-27 11:39:06 +00:00
pooka
c3b193c57f Add a public interface for setting a cookie mapper. 2007-12-25 20:38:01 +00:00
pooka
80ecfb9fc9 * dump r/w return resid
* fix RV dump order to be more logical
2007-12-25 20:36:53 +00:00
ad
622bbc505a - Use pthread__cancelled() in more places.
- pthread_join(): assert that pthread_cond_wait() returns zero.
2007-12-24 16:04:20 +00:00
ad
989565f81d - Fix pthread_rwlock_trywrlock() which was broken.
- Add new functions: pthread_mutex_held_np, mutex_owner_np, rwlock_held_np,
  rwlock_wrheld_np, rwlock_rdheld_np. These match the kernel's locking
  primitives and can be used when porting kernel code to userspace.

- Always create LWPs detached. Do join/exit sync mostly in userland. When
  looped on a dual core box this seems ~30% quicker than using lwp_wait().
  Reduce number of lock acquire/release ops during thread exit.
2007-12-24 14:46:28 +00:00
ad
8f05f9cc26 Update. 2007-12-24 14:30:09 +00:00
skrll
24ced765a1 Add a comment explaining stack layout and register contents. 2007-12-22 14:10:03 +00:00
yamt
392c2dc8c2 sync with kernel. 2007-12-22 01:22:03 +00:00
martin
53a105b083 Disable the umac-64 MAC for now, it needs to be rewritten from scractch.
Addresses PR bin/37562.
2007-12-20 14:14:04 +00:00
pooka
a8e13cb420 Add generic getattr routine. 2007-12-19 14:01:16 +00:00
christos
cd7947efb0 update to 4.7 2007-12-18 02:34:32 +00:00
pooka
08c7b6138e * nuke puffs_cc_get{specific,usermount} for good
* move prototypes for puffs_docc and puffs_dopufbuf into the
  public header, as they are should be exposed
2007-12-16 20:02:57 +00:00
pooka
369391b0a0 Clarify that link_target in node_symlink is null-terminated. 2007-12-16 19:10:58 +00:00
lukem
433c095cb8 Add references to various protocol pages that support setsockopt(2).
Makes it much easier to find them.
2007-12-16 09:49:28 +00:00
pooka
049d39b202 document puffs_dopufbuf 2007-12-15 20:11:38 +00:00
pooka
96294df307 update to match reality 2007-12-15 20:08:06 +00:00
perry
4d096031f0 replace instances of __attribute__((__packed__)) with __packed 2007-12-15 16:03:29 +00:00
yamt
5107db92df document following system calls.
_lwp_ctl
	_lwp_getname
	_lwp_setname
2007-12-14 21:52:17 +00:00
yamt
45cbede9e5 document following functions.
pthread_attr_getname_np
	pthread_attr_setname_np
	pthread_getname_np
	pthread_setname_np
2007-12-14 21:51:21 +00:00
yamt
b367d7f8b2 fix indentation. 2007-12-14 19:51:37 +00:00
xtraeme
5ee1eac43a Fix up a comment. 2007-12-14 17:32:47 +00:00
christos
6d28b23da6 - add dehumanize_number
- decls for humanize_number and dehumanize_number are in stdlib.h
2007-12-14 17:26:19 +00:00
christos
b31749e77b add fw decl. 2007-12-14 17:06:07 +00:00
christos
b76677eda5 fix obvious bogon [can't alias symbol to itself] 2007-12-14 17:04:28 +00:00
xtraeme
486b2ff085 The humanize_number(3) proto will be available in stdlib.h, after
christos moves it to the correct place.
2007-12-14 16:31:20 +00:00
macallan
f53566168d make this compile again 2007-12-12 17:56:10 +00:00
xtraeme
c747551b64 puffs_fuse_node_create: if create() is specified set S_IFREG explicitly
to avoid passing unspecified mode. Fixes latest ntfs-3g... patch
from pooka tested by myself.
2007-12-12 16:37:56 +00:00
pooka
d24dc71203 nuke #define whose purpose has ceased to be 2007-12-11 20:17:26 +00:00
ad
5a5d5865cd Remove test of pthread__osrev that is no longer needed. 2007-12-11 03:21:30 +00:00
adrianp
f5bbb7d634 Cosmetic path changes just clarifying where we actually get the contents
of these files from.
2007-12-09 22:44:12 +00:00
adrianp
d905c3e71c OpenSSL switched to using Makefile (as opposed to Makefile.ssl) a little
while ago now.
2007-12-09 21:57:35 +00:00
pooka
6617b3099a print newnode cookie value for operations which create nodes 2007-12-09 16:54:17 +00:00
agc
3cda7b4363 Use the portable md5 routines that have been added to the NetBSD iSCSI
distribution.
2007-12-09 09:23:58 +00:00
pooka
319ddafdc5 Now that "l" is gone both as an argument to operations and from
componentname, remove all vestiges of puffs_cid.
2007-12-08 19:57:02 +00:00
jdc
7cc6075b0e Keep pushed-back characters locally. Fixes problems where KEY_* symbols
are pushed back.  Should fix the arrow keys part of PR pkg/37173.

While we are here, make getch() and get_wch() check for resize immediately,
instead of reading a key, checking for resize and then having to push-back
the just read key.
2007-12-08 18:38:11 +00:00
he
c26a54ba24 Ensure that we pass -z initfirst to the linker. The mips gcc
was unhappy about the missing -Wl specification.
2007-12-08 18:34:51 +00:00
wiz
397b6da020 Fix typo, remove superfluous minus and describe "fd" as file descriptor
in two places.
2007-12-08 10:56:06 +00:00
ad
37132d5d2f Back out previous now that libc/libpthread are initialized first. 2007-12-07 20:36:52 +00:00
ad
558a5ffd0f rtld changes for PR bin/37347:
- Apply patch from J.T. Conklin to execute .init/.fini functions in order.
- Support DF_1_INITFIRST and mark libc with DF_1_INITFIRST. Shared libs
  should be recording a dependency on libc, but it's too late to do that.

Ok christos@.
2007-12-07 20:34:04 +00:00
pooka
dc3259d60e puffs_cc_getusermount(), puffs_cc_getspecific() and puffs_docc() are dead. 2007-12-07 14:55:12 +00:00
simonb
179bda4711 Fix twalk()s 3rd argument name so that it matches rest of manpage and
the source code.
2007-12-07 07:33:13 +00:00
ad
a9718d7115 pthread__mutex_lock_slow: avoid entering the waiters list if a race to
acquire the mutex is lost. Removing the current thread from the waiters
list requires at least one syscall.
2007-12-07 01:38:38 +00:00
dyoung
eac83fd0cb Use __arraycount(). 2007-12-06 22:51:57 +00:00
seb
975a58878b Fix stresep(3) handling of consecutive quoted delimiter characters.
Approved by christos@
2007-12-06 22:07:07 +00:00
christos
14c8a52580 From Richard M Kreuter, add GLOB_PERIOD. 2007-12-05 20:25:54 +00:00
pooka
9bc20dea14 free flushbuffer after use 2007-12-05 18:55:19 +00:00
pooka
7d5d7f4ff9 Send a response message for flush operations from the kernel instead
of abusing the return value of write(2).
2007-12-05 12:11:56 +00:00
pooka
ca8fca7bb9 inverse inverse logic 2007-12-05 11:06:05 +00:00
pooka
8dad772fa4 apply previous in a more readable way 2007-12-05 10:13:37 +00:00
dogcow
96302ffc73 "fix" complaints about type-punned pointers with some icky casts. 2007-12-05 04:29:10 +00:00
mjf
d4a648c345 Implement a new magic string for magic symlinks, @ruid, which exapnds to the
real user id of the process and use this magic string for per-user tmp.
This should fix PR/35687

Kernel parts reviewed by wrstuden@
2007-12-04 22:09:01 +00:00
pooka
61113f40fd Part 3/n of extensive changes to message handling:
Get rid of the original puffs_req(3) framework and use puffs_framebuf(3)
instead for file system requests.  It has the advantage of being
suitable for transporting a distributed message passing protocol
and therefore us being able to run the file system server on any
host.

Ok, puffs is not quite here yet: libpuffs needs to grow request
routing support and the message contents need to be munged into a
host independent format.  Saying which format would be telling,
but it might begin with an X, end in an L and have the 13th character
in the middle.  Keep an eye out for the sequels: Parts 3+m/n.
2007-12-04 21:24:10 +00:00
pooka
cf878f1627 add flushops 2007-12-04 20:03:40 +00:00
pooka
661a5edd0a tyop: reserver -> reserve 2007-12-04 19:40:45 +00:00
christos
b831a8ada2 move decls for _malloc_{pre,post}fork() to extern.h 2007-12-04 17:45:07 +00:00
christos
86ef91b80e - use a non localized version of strerror_r.
- kill localized declarations and let namespace.h do its work.
2007-12-04 17:43:51 +00:00
pooka
2049bce7a5 realloc() len+incr, not offset+incr. Makes space reservation
actually work properly.
2007-12-04 17:21:24 +00:00
yamt
f078e05288 pthread__mutex_wakeup: ignore ESRCH from _lwp_unpark.
once we clear pt_sleeponq, the target thread can proceed further
and even do pthread_exit.
2007-12-04 16:56:11 +00:00
yamt
fc51c23a2d remove unnecessary assignments. 2007-12-04 16:08:28 +00:00
wiz
1746ee1de1 Add comma in enumeration. Punctuation nits. Fix a typo. 2007-12-02 22:05:51 +00:00
wiz
6db764bae5 Add comma in enumeration. 2007-12-02 19:43:10 +00:00
skrll
fd903b1729 Implement ptrace. 2007-12-02 15:48:47 +00:00
skrll
819071140e Fix include files and change use LEAF_ENTRY_NOPROFILE function to fix
the unwind entry.
2007-12-02 14:04:19 +00:00
skrll
587600728d Fix things so that crti.o doesn't contain a completely bogus unwind entry
that covers far too much and confuses gdb.

While here remove useless dave/restore of r4.
2007-12-02 13:55:38 +00:00
rillig
d59ceee59e ENOENT is also returned when the script interpreter does not exist. 2007-12-02 10:26:27 +00:00
ad
8b96cb8a97 Back out the per-cpu arena changes. With this, ld.so magically stops
loading libc/libpthread twice -- which does not make sense, because it
has its own private malloc().
2007-12-01 22:44:44 +00:00
wiz
9429ef03ff Fix another persistent spello. 2007-12-01 19:54:01 +00:00
wiz
0b6ffdfedb Fix a typo that has migrated across files. 2007-12-01 19:18:49 +00:00
wiz
a6e62b1ef7 Use more markup. New sentence, new line. 2007-12-01 19:03:26 +00:00
pooka
c8c3c477bb fix gotframe signature to match code 2007-12-01 18:59:36 +00:00
wiz
8498f992c4 Typo fixes. 2007-12-01 18:53:28 +00:00
wiz
46b4723955 eg -> e.g. 2007-12-01 18:33:11 +00:00
yamt
c2ad33834a CLEANFILES=${OBJS} 2007-12-01 11:06:36 +00:00
yamt
82f3754f04 ___start: remove a stale comment. 2007-12-01 10:16:06 +00:00
ad
64ebe1397e Hack around ld.so initializing pthread users before libpthread/libc. 2007-12-01 01:19:31 +00:00
ad
b565a56cfb - On 64-bit platforms 1/2 the default tsd values were garbage. Fix it.
- The lwpctl block is now needed on uniprocessors, for pthread_curcpu_np().
2007-12-01 01:07:34 +00:00
rillig
b54c9d13a0 typo 2007-11-30 23:01:03 +00:00
pooka
21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
dsl
b3dec55727 Fix the other half of the 'store int as a thread specific pointer'/ 2007-11-30 17:44:38 +00:00
christos
e09a2e99e8 converting a pointer to unsigned is bad; use uintptr_t. 2007-11-30 17:09:22 +00:00
ad
49dcd767c3 Make the allocation arenas per-CPU in the most optimistic case, but
continue to 'stripe' by thread in case of contention.
2007-11-29 18:46:13 +00:00
pooka
aadcb17f11 * allocate pcc as a slice from the stack instead of allocating it
separately
* provide puffs_cc_getcc()

This is in preparation for the removal of you-should-guess-what as
an argument to routines here and there and everywhere.
2007-11-29 17:47:54 +00:00
pooka
73a538eac2 print mode in open 2007-11-29 17:22:04 +00:00
christos
f6cecc05cf Sync phk malloc.c with the latest one from FreeBSD. This gives us the
same api as jemalloc by:

    - adding posix_memalign()
    - moving calloc in the same file
    - renaming malloc_options -> _malloc_options
2007-11-28 21:55:14 +00:00
christos
621fa4d8c6 Regen! 2007-11-27 22:19:11 +00:00
christos
5b5262a0af another minor fix from Anon Ymous 2007-11-27 22:16:03 +00:00
ad
ae87f94d1d Bump libc/libpthread minor for thr_curcpu()/pthread_curcpu_np(). 2007-11-27 21:06:41 +00:00
ad
4084ca7f3f Add thr_curcpu(), pthread_curcpu_np(). 2007-11-27 20:58:26 +00:00
ad
d5e9b90716 Fix a warning with _LP64. 2007-11-27 20:55:03 +00:00
pooka
6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
tnozaki
7e1ba00ce8 more PR/36938, restore internal-state if mbtowc() throw EILSEQ.
patch provided by Shiozaki-san, thanks.
2007-11-26 15:31:30 +00:00
christos
1f07a76abf fix substitutions. From Anon Ymous 2007-11-26 15:12:06 +00:00
pooka
7568ff51e1 print more info when receiving an abort 2007-11-26 12:20:21 +00:00
dsl
d8e8042c1c Add a note about the difficulty of actually looking at the return value
of __syscall() caused by ABIs (eg sparc) that don't pass the low bits of
a 64 bit result in the same register as a 32 bit result.
2007-11-23 20:29:40 +00:00
uebayasi
2b37ebddcf KNF; no variable name in function prototype. 2007-11-23 12:39:15 +00:00
dsl
3ba44b945b Reorder the code for i386 and amd64 syscall stubs so that the 'jc' on error
is a forwards jump instead of a backwards jump that a P4 will mispredect (and
probably immediatly get a cache-line miss due to the way the code gets
aligned).
2007-11-23 07:36:05 +00:00
dsl
b0b7248d92 Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
2007-11-22 21:11:30 +00:00
tnozaki
fca38949e4 fix lib/37290
- don't call abort(3) when there's no suitable charset found.
- use iso-8859-1(or INIT1 if specified) for C1 control char.
2007-11-21 14:19:32 +00:00
rillig
55bf992f36 The e* functions don't call the error handler in every case, just in
case of an error.

Mentioned the error conditions for the various functions.
2007-11-21 09:17:24 +00:00
ad
a4c99db9fe Sync with reality, and note that programs must link against the dynamic
libpthread in order to remain compatible with future releases of NetBSD.
2007-11-19 15:53:20 +00:00
ad
8077340e63 Remove the debuglog stuff. ktrace is more useful now. 2007-11-19 15:14:11 +00:00
ad
a448c4f214 int -> ssize_t in a couple of places. 2007-11-19 15:12:18 +00:00
ad
95182011ed Enable posix_memalign(). 2007-11-19 14:48:41 +00:00
skrll
4f3467d61e Remove unused include.
Fix unwind info with S/ENTRY/LEAF_&/
2007-11-18 14:11:25 +00:00
skrll
8ed2bd6ec6 Generate correct unwind info for syscall stubs by using LEAF_ENTRY instead
of ENTRY(foo,0) so that gdb can backtrace through the stubs.
2007-11-18 13:25:39 +00:00
jdc
ca32a8e578 We don't need to call __init_getch here, as it is called from
screen.c:newterm().
2007-11-18 10:01:04 +00:00
pooka
dac2b0c689 fix request size 2007-11-17 17:12:11 +00:00
pooka
4b2334142b puffs_mount():
* initialize values better
* always go through "fail" to see if puffs_daemon() needs to be
  woken up
* open device r/w instead of r/o
2007-11-17 16:06:18 +00:00
plunky
06e82841a0 Fix problem with handling SDP contination state, from FreeBSD
(specifically, this manifested itself when reading a long HID
descriptor from a Microsoft Mouse.)
2007-11-16 19:35:08 +00:00
pooka
3537e99eb1 Introduce puffs_daemon(), which works like daemon(3) except that it
also synchronizes with puffs_mount() and does not return (exit) in the
parent process until the file system has been mounted.  This makes
it possible to reliably run e.g. mount_foo jippi /kai ; cd /kai/ee
2007-11-16 18:35:10 +00:00
pooka
154c2e54fb dump lookup return values 2007-11-16 14:59:14 +00:00
drochner
095b25e7dd Add pthread_equal() to libc stubs; this makes a lot of sense for
threadsafe libraries implementing own locking functions.
Ride on yesterday's minor version bumps.
2007-11-14 19:28:23 +00:00
ad
4be57c5368 Don't try to block if there are already waiters; it doesn't make sense. 2007-11-14 17:20:57 +00:00
ad
b919eb8116 Crank libpthread to 0.8. It now uses _lwp_ctl(), and it's handy to keep
0.7 hanging around for old kernels.
2007-11-13 17:22:51 +00:00
ad
66ac2ffaf2 Mutexes:
- Play scrooge again and chop more cycles off acquire/release.
- Spin while the lock holder is running on another CPU (adaptive mutexes).
- Do non-atomic release.

Threadreg:

- Add the necessary hooks to use a thread register.
- Add the code for i386, using %gs.
- Leave i386 code disabled until xen and COMPAT_NETBSD32 have the changes.
2007-11-13 17:20:08 +00:00
ad
3c776c8aa6 Bump libc minor for _lwp_ctl, libpthread constructor changes. 2007-11-13 17:13:14 +00:00
ad
15e9cec117 For PR bin/37347:
- Override __libc_thr_init() instead of using our own constructor.
- Add pthread__getenv() and use instead of getenv(). This is used before
  we are up and running and unfortunatley getenv() takes locks.

Other changes:

- Cache the spinlock vectors in pthread__st. Internal spinlock operations
  now take 1 function call instead of 3 (i386).
- Use pthread__self() internally, not pthread_self().
- Use __attribute__ ((visibility("hidden"))) in some places.
- Kill PTHREAD_MAIN_DEBUG.
2007-11-13 15:57:10 +00:00
ad
46f5cd4fb9 - Make it pass lint.
- Add RCSID.
2007-11-13 15:33:55 +00:00
ad
ec4d182d4a - stack_protector.c doesn't really belong under sys/. Add a new directory
for misc support routines and put it there.
- Add a libc constructor. Use this to initialize threading and the
  stack protector stuff. libpthread cannot be initialized safely using
  its own constructor because libc and libpthread are deeply intertwined.
  PR bin/37347
2007-11-13 15:21:19 +00:00
he
4869f8a215 Need to point to sys/ for includes to pick up <sys/lwpctl.h> for
the lint stubs.
2007-11-13 10:22:15 +00:00
he
3b9b3c5341 We now need <sys/lwpctl.h> included in order to lint LintSysNormal.c. 2007-11-13 09:07:33 +00:00