aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-01-05sam: rm dregsRuss Cox4-293/+0
2021-01-05stats: add threadmaybackgroundRuss Cox5-40/+49
2020-12-30acme: allow @ in file namesRuss Cox1-1/+1
For upspin and other tools that put email addresses in names.
2020-12-309term: add threadmaybackgroundRuss Cox1-0/+6
2020-12-30libthread: drop schedlockRuss Cox2-2/+1
Having two locks in the proc was causing deadlocks.
2020-12-30tcolors: add threadmaybackgroundRuss Cox1-0/+6
2020-12-309a: remove a few mentionsRuss Cox1-1/+1
2020-12-30all: remove $OBJTYPE from buildRuss Cox36-1201/+25
Now that we assume pthreads, the only assembly left is in libmp and libsec. We only ever added assembly for 386. The portable C code is fine for plan9port.
2020-12-309term: use openpty on NetBSDNicola Girardi1-0/+16
Fixes #376.
2020-12-30devdraw: add /usr/X11R7 for NetBSDRuss Cox1-0/+2
Fixes #362.
2020-12-30libthread: simplifyRuss Cox21-1469/+11
Now that everything uses pthreads and pthreadperthread, can delete various conditionals, all the custom context code, and so on. Also update documents. Fixes #355.
2020-12-30libthread: make pthreadperthread the defaultRuss Cox1-1/+1
2020-12-30libthread: fix pthreadperthread bugsRuss Cox2-107/+187
2020-12-30libthread: add threadmaybackgroundRuss Cox17-7/+93
Programs that want to background themselves now need to define threadmaybackground returning 1. This avoids a confusing (to people and debuggers) extra parent process for all the threaded programs that will never want to background themselves.
2020-12-30libthread: delete NetBSD special caseRuss Cox4-465/+4
I added a direct call from thread.c to pthread.c's _threadpthreadstart in May, and no one has complained about NetBSD being broken. So probably no one is using this on NetBSD at all. Make pthread the only option.
2020-12-15libthread: fix use after free of first thread in each procRuss Cox1-1/+9
This was causing sporadic but frequent crashes at startup in 9pserve on the new M1 Macs, correctly diagnosing a use-after-free.
2020-12-15time: print 1s of millisecondsRuss Cox1-3/+3
2020-08-15all: a few more #define tricks for AIXRuss Cox2-0/+36
This should make the AIX build finally work. Fixes #400.
2020-08-15fontsrv: fix handling of colored glyphs (emoji)Russ Cox1-5/+17
Drawing as white on black to produce a mask only works if the white on black is the inversion of black on white. Emoji that force use of specific colors don't respect that. Draw black on white and invert to mask separately.
2020-08-08touch: fix for OpenBSD.James Cook1-1/+1
This fixes https://github.com/9fans/plan9port/issues/436 This doesn't necessarily address the underlying issue: calling p9create with mode = OREAD should probably be allowed, but currently doesn't work on OpenBSD.
2020-07-22devdraw, libdraw: fix memory leaks by freeing getns() malloced string (#431)Igor Böhm2-4/+11
2020-07-18acme: add font control messageRuss Cox1-0/+18
2020-06-22src/cmd: rm dformatRuss Cox1-108/+0
Unclear why it is here (wkj added it long ago). It has never been installed into $PLAN9/bin, so it's doubtful that anyone has ever used it. Arnold Robbins has an alternate version at https://github.com/arnoldrobbins/dformat. Fixes #421.
2020-06-15libthread: use libc functions in ucontext for macOS (#417)Xiao-Yong3-81/+3
2020-06-04fontsrv: fix compilation on X11 (#420)Gregor Best1-0/+1
2020-05-29ed: handle Unicode beyond the BMP correctly in list mode.sean1-9/+32
List mode was constrained to the BMP. This change introduces the following new list mode convention, using Go string literal syntax: Non-printing ASCII characters display as \xhh. Non-ASCII characters in the BMP display as \uhhhh. Characters beyond the BMP display as \Uhhhhhhhh.
2020-05-29devdraw: accept 5- and 6-byte Unicode hex valuesRuss Cox1-8/+31
Alt X 1234 for U+1234 Alt X X 12345 for U+12345 Alt X X X 103456 for U+103456.
2020-05-29fontsrv: scale f->originy to match f->height on x11dzklaim1-1/+1
Co-authored-by: dzklaim <smmoth.rp@gmail.com>
2020-05-29fontsrv: handle non-BMP runes on X11Russ Cox4-43/+44
Have to adjust algorithms to deal with much larger number of subfont files as well.
2020-05-29libdraw: handle larger number of subfontsRuss Cox1-1/+1
2020-05-18devdraw, libdraw: handle keyboard runes > U+FFFFRuss Cox5-5/+25
Runes in Plan 9 were limited to the 16-bit BMP when I drew up the RPC protocol between graphical programs and devdraw a long time ago. Now that they can be 32-bit, use a 32-bit wire encoding too. A new message number to avoid problems with other clients (like 9fans.net/go). Add keyboard shortcut alt : , for U+1F602, face with tears of joy, to test that it all works.
2020-05-18build: use installbsd instead of install on AIXRuss Cox5-7/+4
Even in mkmk.sh.
2020-05-18rc: avoid problematic internal names "var", "thread"Russ Cox1-0/+6
For AIX.
2020-05-18acme: avoid global named "class"Russ Cox1-0/+3
For AIX.
2020-05-18libdiskfs: avoid problematic internal constant namesRuss Cox2-0/+66
AIX defines some of these constants in its C header files.
2020-05-18diff: rename class to fix AIXRuss Cox1-0/+3
math.h defines a function named class on AIX.
2020-05-18devdraw: use indirect impl interface in x11Gabriel Diaz1-0/+21
2020-05-18lib9: avoid unportable use of d_namlen in dirreadRuss Cox1-2/+1
Fixes #395.
2020-05-17devdraw: use global drawlk instead of per-clientRuss Cox3-18/+20
Setting up for a real window system.
2020-05-17devdraw: use indirect impl interfaceRuss Cox4-30/+61
Setting up for a real window system.
2020-05-17libthread: handle spurious _procsleep wakeups, fix $LIBTHREAD handlingRuss Cox2-6/+26
2020-05-17libthread: add pthreadperthread mode and use under ASANRuss Cox4-18/+120
ASAN can't deal with the coroutine stacks. In theory we can call into ASAN runtime to let it know about them, but ASAN still has problems with fork or exit happening from a non-system stack. Bypass all possible problems by just having a full OS thread for each libthread thread. The threads are still cooperatively scheduled within a proc (in thos mode, a group of OS threads). Setting the environment variable LIBTHREAD=pthreadperthread will enable the pthreadperthread mode, as will building with CC9FLAGS='-fsanitize=address' in $PLAN9/config. This solution is much more general than ASAN - for example if you are trying to find all the thread stacks in a reproducible crash you can use pthreadperthread mode with any debugger that knows only about OS threads.
2020-05-17mk: replace overlapping strcpy with memmoveRuss Cox1-1/+2
Found by ASAN.
2020-05-17lib9: use opendir/readdir to read directoriesRuss Cox1-183/+187
getdirentries(2) has been deprecated on macOS since 10.5 (ten releases ago). Using it requires disabling 64-bit inodes, but that in turn makes binaries incompatible with some dynamic libraries, most notably ASAN. At some point getdirentries(2) will actually be removed. For both these reasons, switch to opendir/readdir. A little clunky since we have to keep the DIR* hidden away to preserve the int fd interfaces, but it lets us remove a bunch of OS-specific code too.
2020-05-17lib9: move seek into open.cRuss Cox4-12/+7
More preparation for opendir.
2020-05-17lib9: add closeRuss Cox1-0/+7
More preparation for opendir.
2020-05-17lib9: merge create, open, dirread into open.cRuss Cox5-292/+273
Preparation for using opendir.
2020-05-08fmt: adjust GCC version checkKurt H Maier1-2/+2
atomics were added in GCC 4.9: https://gcc.gnu.org/gcc-4.9/changes.html
2020-05-07all: fix #includes for AIX, add a few AIX "implementation" filesBen Huntsman8-0/+21
2020-05-07mk: support Big Archive Format under AIXBen Huntsman1-0/+4