summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Ushakov <uwe@stderr.spb.ru>2020-01-01 03:03:27 +0300
committerValery Ushakov <uwe@stderr.spb.ru>2020-01-01 03:03:27 +0300
commit7828d5d2aa2aeba1588dba190fd80dcab95d982b (patch)
treed1eafdafcdfc6663adbb90026ba36995ea041419
parent258f4974aca51f197616058e11774242ce91b21d (diff)
parent012b00b7e47ed291b1f2ab07745f5a53db357c91 (diff)
Merged inferno-os/inferno-os into master
-rw-r--r--.gitignore4
-rw-r--r--emu/port/alloc.c19
-rw-r--r--emu/port/kproc-pthreads.c6
-rw-r--r--man/1/kill2
-rw-r--r--man/1/logon2
-rw-r--r--man/1/mk2
-rw-r--r--man/1/sh2
-rw-r--r--man/1/sh-std2
-rw-r--r--man/2/readdir2
-rw-r--r--man/2/registries2
-rw-r--r--man/2/spree-cardlib2
-rw-r--r--man/2/sys-0intro2
-rw-r--r--man/2/sys-dirread2
-rw-r--r--man/2/tkclient2
-rw-r--r--man/4/9srvfs2
-rw-r--r--man/5/version2
-rw-r--r--man/6/attrdb2
-rw-r--r--man/6/keytext2
-rw-r--r--man/6/ndb2
19 files changed, 34 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
index f47a9611..fd769c9d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,10 @@ y.debug
# initial mk from makemk.sh
/utils/mk/mk
+# no binaries are committed for any of the netbsd ports
+# can be deleted if wildcard from the comment below is enabled
+/NetBSD/*/bin/
+
# preserve the patterns from .hgignore, though perhaps all binaries
# should be deleted and ignored with:
# /[A-Z]*/*/bin/
diff --git a/emu/port/alloc.c b/emu/port/alloc.c
index 8b623de0..3cb45552 100644
--- a/emu/port/alloc.c
+++ b/emu/port/alloc.c
@@ -75,11 +75,7 @@ enum {
/* tracing */
enum {
-#ifdef __NetBSD__
- Npadlong = 4, /* XXX: preserve 16-byte alignment */
-#else
Npadlong = 2,
-#endif
MallocOffset = 0,
ReallocOffset = 1
};
@@ -383,9 +379,22 @@ dopoolalloc(Pool *p, ulong asize, ulong pc)
unlock(&p->l);
return nil;
}
+#ifdef __NetBSD__
+ /* Align allocations to 16 bytes */
+ {
+ const size_t off = __builtin_offsetof(struct Bhdr, u.data)
+ + Npadlong*sizeof(ulong);
+ struct assert_align {
+ unsigned int align_ok : (off % 8 == 0) ? 1 : -1;
+ };
+
+ const ulong align = (off - 1) % 16;
+ t = (Bhdr *)(((ulong)t + align) & ~align);
+ }
+#else
/* Double alignment */
t = (Bhdr *)(((ulong)t + 7) & ~7);
-
+#endif
if(p->chain != nil && (char*)t-(char*)B2LIMIT(p->chain)-ldr == 0){
/* can merge chains */
if(0)print("merging chains %p and %p in %s\n", p->chain, t, p->name);
diff --git a/emu/port/kproc-pthreads.c b/emu/port/kproc-pthreads.c
index c6caded6..a15a7cd3 100644
--- a/emu/port/kproc-pthreads.c
+++ b/emu/port/kproc-pthreads.c
@@ -122,12 +122,6 @@ kproc(char *name, void (*func)(void*), void *arg, int flags)
panic("kproc: no memory");
os->self = 0; /* set by tramp */
sem_init(&os->sem, 0, 0);
-#if defined(__NetBSD__) && defined(__powerpc__)
- { /* XXX: Work around a problem on macppc with kernel semaphores. */
- int val;
- sem_getvalue(&os->sem, &val);
- }
-#endif
p->os = os;
if(flags & KPDUPPG) {
diff --git a/man/1/kill b/man/1/kill
index 0b1eb0ba..992a773f 100644
--- a/man/1/kill
+++ b/man/1/kill
@@ -53,7 +53,7 @@ finds all such processes owned by
.I user
(default: the current user), and
prints
-.I sh (1)
+.IR sh (1)
commands to kill them.
The commands can be piped to the shell or selectively run,
releasing back to the system any resources owned by those processes.
diff --git a/man/1/logon b/man/1/logon
index f95e0850..46ec01d6 100644
--- a/man/1/logon
+++ b/man/1/logon
@@ -17,7 +17,7 @@ logon \- log on to Inferno
.I Logon
logs a user in to the Inferno environment.
It requires
-.I wm (1)
+.IR wm (1)
to be started first.
If no
.I user
diff --git a/man/1/mk b/man/1/mk
index bdf56e84..c18eceb7 100644
--- a/man/1/mk
+++ b/man/1/mk
@@ -159,7 +159,7 @@ might be:
.IP
.EX
%.dis: %.b
- limbo $stem.b
+ limbo $stem.b
cp $stem.dis /dis
.EE
.PP
diff --git a/man/1/sh b/man/1/sh
index 401897e2..18ecaf04 100644
--- a/man/1/sh
+++ b/man/1/sh
@@ -96,7 +96,7 @@ A Dis module will be executed only if it
implements the
.B Command
interface (see
-.IR sh (1));
+.IR command (2));
a script file will be executed only if it
starts with the characters
.RB `` #! ''
diff --git a/man/1/sh-std b/man/1/sh-std
index 0689d5e8..148e5f47 100644
--- a/man/1/sh-std
+++ b/man/1/sh-std
@@ -102,7 +102,7 @@ std, if, while, ~, no, !, apply, getlines, status, pctl, fn, and, or, raise, res
.IB list }
.br
.B ${parse
-.IB arg ]
+.IB arg }
.br
.B ${pipe
(
diff --git a/man/2/readdir b/man/2/readdir
index c7acb7ec..643b5182 100644
--- a/man/2/readdir
+++ b/man/2/readdir
@@ -29,7 +29,7 @@ The integer element of the tuple is the number of entries
returned, or \-1 if there was an error reading the directory.
.B Readdir
differs from
-.I sys-dirread (2)
+.IR sys-dirread (2)
in returning the contents of the whole directory, not just a chunk of it,
and in allowing the result to be sorted.
.PP
diff --git a/man/2/registries b/man/2/registries
index f390b1ab..3a71b7b8 100644
--- a/man/2/registries
+++ b/man/2/registries
@@ -56,7 +56,7 @@ Registry: adt {
.SH DESCRIPTION
.B Registries
helps access and update the contents of one or more
-.I registry (4)
+.IR registry (4)
servers.
Each registry lists services, each described by a set of attribute/value pairs.
The attributes need not identify the service uniquely.
diff --git a/man/2/spree-cardlib b/man/2/spree-cardlib
index 6c495902..0629fa06 100644
--- a/man/2/spree-cardlib
+++ b/man/2/spree-cardlib
@@ -99,7 +99,7 @@ Selection: adt {
.I Cardlib
provides facilities to help in the implementation
of
-.I spree (2)
+.IR spree (2)
engines that implement the
.IR spree-cards (4)
interface.
diff --git a/man/2/sys-0intro b/man/2/sys-0intro
index fd132e58..27b36d18 100644
--- a/man/2/sys-0intro
+++ b/man/2/sys-0intro
@@ -195,7 +195,7 @@ An offset can also be passed as a parameter to
and
.B pwrite
(see
-.I sys-read (2)).
+.IR sys-read (2)).
.PP
Inferno provides no guarantee of consistency should
several processes access a file concurrently.
diff --git a/man/2/sys-dirread b/man/2/sys-dirread
index 1599d58b..d39c9b93 100644
--- a/man/2/sys-dirread
+++ b/man/2/sys-dirread
@@ -42,7 +42,7 @@ are allowed on directories only to seek to the start.
In general, several calls to
.B dirread
will be needed to read the whole directory.
-.I Readdir (2)
+.IR Readdir (2)
provides functions that return all the directory entries at once,
optionally sorted.
.SH SEE ALSO
diff --git a/man/2/tkclient b/man/2/tkclient
index c8bf5091..3a8c9ef4 100644
--- a/man/2/tkclient
+++ b/man/2/tkclient
@@ -181,7 +181,7 @@ for keyboard events, and
for pointer events.
.PP
The simplest well-behaved
-.I wm (1)
+.IR wm (1)
client will therefore contain:
.PP
.EX
diff --git a/man/4/9srvfs b/man/4/9srvfs
index 19089931..83c9dbe9 100644
--- a/man/4/9srvfs
+++ b/man/4/9srvfs
@@ -16,7 +16,7 @@ It uses
to make an Inferno service
.I source
available to Plan 9 applications via the Plan 9 service registry.
-.I Srv9 (3)
+.IR Srv9 (3)
must previously have been bound to
.B /srv
in the current name space, with
diff --git a/man/5/version b/man/5/version
index 9fea7294..ac36394a 100644
--- a/man/5/version
+++ b/man/5/version
@@ -92,7 +92,7 @@ requests is called a
The
.B version
message is generated by
-.I sys-fversion (2).
+.IR sys-fversion (2).
It is also generated automatically, if required, by a
.B mount
or
diff --git a/man/6/attrdb b/man/6/attrdb
index eba77a1f..9a8f03a4 100644
--- a/man/6/attrdb
+++ b/man/6/attrdb
@@ -9,7 +9,7 @@ For instance,
Inferno uses an attribute data base
.IR ndb (6)
to organise network configuration data.
-.I Attrdb (2)
+.IR Attrdb (2)
is typically used by applications to search the data.
.PP
Each entry in the data base consists of one or more lines containing
diff --git a/man/6/keytext b/man/6/keytext
index 0e9876eb..173806e5 100644
--- a/man/6/keytext
+++ b/man/6/keytext
@@ -84,7 +84,7 @@ and then encoded in base-64 (as by
Each value labelled
.RI ` -name '
is
-.I utf (6)
+.IR utf (6)
text not containing a newline;
it is interpreted by an application and need not be a name.
The expiry time
diff --git a/man/6/ndb b/man/6/ndb
index c84c33eb..e2bc7ab6 100644
--- a/man/6/ndb
+++ b/man/6/ndb
@@ -114,7 +114,7 @@ accepted by
Network applications might use other attributes of their own,
which they document on their own pages.
.PP
-.I Cs (8)
+.IR Cs (8)
interprets a host name of the form
.BI $ server
as referring to the set of names and addresses that are values