Go to file
skrll 8e8c0784cf Remove memory barriers from the atomic_ops(3) atomic operations. They're
not needed for correctness.

Add the correct memory barriers to the gcc legacy __sync built-in
functions for atomic memory access.  From the gcc documentation:

In most cases, these built-in functions are considered a full barrier.
That is, no memory operand is moved across the operation, either forward
or backward. Further, instructions are issued as necessary to prevent the
processor from speculating loads across the operation and from queuing
stores after the operation.

type __sync_lock_test_and_set (type *ptr, type value, ...)

   This built-in function is not a full barrier, but rather an acquire
   barrier. This means that references after the operation cannot move to
   (or be speculated to) before the operation, but previous memory stores
   may not be globally visible yet, and previous memory loads may not yet
   be satisfied.

void __sync_lock_release (type *ptr, ...)

   This built-in function is not a full barrier, but rather a release
   barrier. This means that all previous memory stores are globally
   visible, and all previous memory loads have been satisfied, but
   following memory reads are not prevented from being speculated to
   before the barrier.
2021-07-28 07:32:20 +00:00
bin Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. 2021-07-24 21:31:31 +00:00
common Remove memory barriers from the atomic_ops(3) atomic operations. They're 2021-07-28 07:32:20 +00:00
compat remove obsolete files. 2021-06-18 06:34:00 +00:00
crypto Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. 2021-07-24 21:31:31 +00:00
dist/pf Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. 2021-07-24 21:31:31 +00:00
distrib tests/lint: cover every code line in the grammar 2021-07-25 22:03:42 +00:00
doc Tie the maximum file lock per unprivilegied uid to kern.maxfiles 2021-07-27 12:40:07 +00:00
etc aarch64: Restrict KERNEL_SUFFIXES to img only 2021-07-24 17:07:59 +00:00
external KNF 2021-07-25 06:07:42 +00:00
extsrc
games Flush input to EOL correctly in games/fish. 2021-07-25 02:00:42 +00:00
include PR/56250: Michael Forney: mkstemp/mkdtemp not declared with 2021-07-03 14:07:13 +00:00
lib Tie the maximum file lock per unprivilegied uid to kern.maxfiles 2021-07-27 09:32:55 +00:00
libexec Treat failed chdir/chroot for guest and chroot accounts as fatal. 2021-07-03 14:59:49 +00:00
regress citrus SUBDIR is gone 2020-06-27 11:06:43 +00:00
rescue smb is no more. 2020-04-04 17:57:16 +00:00
sbin Remove commented code, including empty if block. Replace tab with whitespace in usage declaration. 2021-07-16 12:09:36 +00:00
share Tie the maximum file lock per unprivilegied uid to kern.maxfiles 2021-07-27 09:32:55 +00:00
sys check temperatures a bit more often 2021-07-28 00:59:10 +00:00
tests Show the stderr from execsnoop so that we can see why it fails on arm. 2021-07-27 15:29:22 +00:00
tools Final note on OpenBSD cross-buildling. Remaining issues were due to 2021-07-11 06:15:42 +00:00
usr.bin lint: inline align_as in the grammar 2021-07-27 05:52:53 +00:00
usr.sbin Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. 2021-07-24 21:31:31 +00:00
BUILDING Reintroduce the support of MKCATPAGES 2020-11-10 21:47:40 +00:00
Makefile G/c spurious whitespace. 2020-10-29 20:26:24 +00:00
Makefile.inc
README.md use libera.chat-hosted kiwiirc 2021-05-29 13:08:08 +00:00
UPDATING note that new GMP may require some cleaning. 2021-07-11 21:58:52 +00:00
build.sh Good bye oabi! Tested building earmv7hf. 2021-06-07 17:11:16 +00:00

README.md

NetBSD

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Building

You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:

./build.sh -U -u -j4 -m amd64 -O ~/obj release

Additional build information available in the BUILDING file.

Binaries

Testing

On a running NetBSD system:

cd /usr/tests; atf-run | atf-report

Troubleshooting

Latest sources

To fetch the main CVS repository:

cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src

To work in the Git mirror, which is updated every few hours from CVS:

git clone https://github.com/NetBSD/src.git