Commit Graph

192 Commits

Author SHA1 Message Date
lukem
c5eb4ab601 fix -Wsign-compare issues 2009-01-18 11:56:51 +00:00
pooka
654753c2e1 include sys/param.h for _HARDKERNEL instead of homegrown def. 2009-01-12 02:53:29 +00:00
pooka
132ffc213b Include userland version of atomic cas routines in librump.
(the kernel version disables interrupts and therefore can't be used)
2009-01-10 23:36:22 +00:00
mjf
a15a784800 The .if conditional crosses a line boundary, so add a backslash.
This fixes the kernel build for hppa.
2009-01-06 13:23:31 +00:00
pooka
1ce853369b Temporarily define MCOUNT as a dummy for _RUMPKERNEL to allow build
to proceed - the MD macros use processor instructions unavailable
to userspace and should/could be provided as interfaces.
2009-01-05 18:06:57 +00:00
pooka
69885c98a3 Do not use lockpatches with _RUMPKERNEL (non-PIC ... and pointless). 2009-01-04 18:46:16 +00:00
pooka
58302d6770 Opt for libc versions in case of _KERNEL && !_RUMPKERNEL.
(kernel version uses sti/cli and is not PIC)
2009-01-04 18:21:38 +00:00
pooka
e77a29de65 allow inclusion of atomic ops in librump 2009-01-04 17:54:29 +00:00
ad
30fd42e845 PR kern/40213 my i386 machine can't boot because of tsc
- Patch in atomic_cas_64() twice. The first patch is early and makes it
  the MP-atomic version available if we have cmpxchg8b. The second patch
  strips the lock prefix if ncpu==1.

- Fix the i486 atomic_cas_64() to not unconditionally enable interrupts.
2008-12-19 11:21:24 +00:00
jnemeth
e971cab0ab fix build in _STANDALONE case 2008-11-21 03:23:43 +00:00
matt
4de7478cea Make lint happy (stupid lint). 2008-11-21 01:58:41 +00:00
matt
0ad7281825 Add new ptree (Patricia / RADIX tree) implementation to NetBSD. 2008-11-20 23:50:08 +00:00
matt
4a0de1478c Add an atomic_cas_8 which uses ldrex/strex. 2008-11-18 15:22:56 +00:00
jnemeth
ef266cee6b oops, converted some #ifndef into #if defined... 2008-11-17 10:21:30 +00:00
jnemeth
3e8ff10fa3 Convert all #ifdef _KERNEL to #if defined (_KERNEL) || defined(_STANDALONE)
from Bernd Ernesti on source-changes@.  This fixes a build breakage
with i386/amd64 bootblocks.
2008-11-17 09:56:48 +00:00
ad
c6555ead19 Our qsort() is inappropriate for kernel use because it makes recursive
calls. Replace it with a kheapsort() function in kernel. Pointed out
by tron@.
2008-11-16 16:15:58 +00:00
ad
e5c4df967a Make qsort() available in libkern. 2008-11-16 15:01:26 +00:00
mrg
4c0ca913b1 look for COMMON_MACHINE_ARCH before MACHINE_ARCH or MACHINE_CPU. 2008-10-26 07:22:50 +00:00
ad
ab62b04dc5 Allow atomic ops to be built as part of libpthread. 2008-09-29 08:43:00 +00:00
joerg
3ae583451f Prepare use of strtoull, strtoumax and strtoimax in tools/compat by
including nbtool_config.h.
2008-09-10 18:08:58 +00:00
matt
331139bd61 Properly deal with LIBC namespace issues. 2008-08-22 03:00:02 +00:00
dogcow
e74fc2a17d Unbork cross-builds in tools/compat/ 2008-08-22 01:48:03 +00:00
oster
5577c7fceb Fix build breakage by adding appropriate #includes.
Patch from joerg@
2008-08-20 19:58:33 +00:00
joerg
245e086321 Unify the implementation of strto{l,ul,ll,ull,imax,umax,q,uq} into one
version for signed and one version for unsigned data types.

Add a check for supported bases and set errno (userland) or panic
(kernel, libsa) otherwise.

Make strto{ll,ull,imax,umax} normal symbols and just keep the underscore
versions as strong alias.

Obtained from DragonFly, based on the wide char version from Citrus.
Reviewed by christos@
2008-08-20 12:42:26 +00:00
matt
c7572a70dd Add assembly versions of atomic ops with ldrex/strex 2008-08-16 07:12:39 +00:00
skrll
d8054af5f4 Provide assembly _atomic_cas_up() as the compiler cannot be trusted to
generate fully restartable code sequences.
2008-08-11 21:54:51 +00:00
dholland
154fe9b1d9 Don't convert cpuid_t through int while testing it for being in range.
(Might truncate it, for one thing. Also, if the shift result is < 0 the
demons have already flown out of our nose.)

Fixes some -Wsign-compare warnings.
2008-07-27 05:47:56 +00:00
rmind
9dfcfe5db5 Add few KASSERTs. 2008-07-14 01:07:39 +00:00
matt
94bc3febe6 Changes to make lint STFU. 2008-06-30 20:54:19 +00:00
matt
5a4f0c6b2b Change tree op members/typedefs to rbto_compare_* from rb_compare_* 2008-06-30 20:14:09 +00:00
matt
48717a981d Move rb.c from sys/lib/libkern to common so it can be in both libc and libkern. 2008-06-30 19:03:59 +00:00
ad
d6c32b235a +atomic_cas_*_ni 2008-06-23 10:33:52 +00:00
ad
7a21650601 Install manual pages for the atomic ops. 2008-06-23 10:22:40 +00:00
he
d6e5879de3 Be consistent in how cpuset_nentries is computed in the kernel and
in user-land.  This fixes the user-land part.  Now "cpuctl identify 0"
gives a result instead of getting EINVAL from the set-affinity syscall.
2008-06-22 21:49:31 +00:00
rmind
54ccd4a6fa kcpuset_isset: remove if-check. It is not reasonable for kernel,
saves few cycles, and it is better for CPU cache.
2008-06-22 03:24:31 +00:00
christos
dfeefcdcb8 Separate cpuset and kcpuset, and only use the bits in userland. Requested
by yamt
2008-06-22 00:05:09 +00:00
christos
ddbb9c58dd We don't need any of this in standalone mode. 2008-06-16 13:02:08 +00:00
christos
04608dd0bf little more lint 2008-06-16 02:53:32 +00:00
christos
834ef62012 make lint happy 2008-06-16 02:30:03 +00:00
rmind
481ae1556f - Add general cpuset macros.
- Use kcpuset name for kernel-only functions.
- Use cpuid_t to specify CPU ID.
- Unify all cpuset users.

API is expected to be stable now.
2008-06-16 01:41:20 +00:00
rmind
7d902495c2 cpuset_create: check the return value of calloc(). 2008-06-15 23:45:51 +00:00
rmind
8f8073542b - cpuset_create: pass correct argument to sysctl(3).
- Constify few variables.
2008-06-15 23:41:39 +00:00
christos
b46ed27e5c Hook into sys 2008-06-15 20:35:11 +00:00
christos
849fbad5b6 cpuset related functions, shared between the kernel and userland. 2008-06-15 20:33:50 +00:00
chs
6740bb5440 enable profiling of assembly functions. 2008-05-25 15:56:11 +00:00
yamt
78eb84d14c whitespace. 2008-05-03 05:43:05 +00:00
yamt
9093441576 rename END to ENDLABEL. i'll use END for other purpose. ok by Andrew Doran. 2008-05-03 05:40:21 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
tsutsui
2be642537b Make this compile (missing register prefix). 2008-04-30 09:59:42 +00:00
ad
9ba64b51be Assembly _atomic_cas_up() for mips. PR lib/38482. 2008-04-30 00:17:34 +00:00