Commit graph

2623 commits

Author SHA1 Message Date
ppatience0
410ce8feec tojpg: add jpeg encoder 2013-05-26 21:56:56 -04:00
cinap_lenrek
71a3ab3f13 kernel: make imagereclaim() skip notext pages (prevent it from blowing the mount cache)
imagereclaim would happily uncache pages from the mountcache (port/cache.c)
without ever getting a Image* released from it. simple fix, just check for
p->image->notext but make sure todo it under the page lock :)
2013-05-27 03:26:53 +02:00
cinap_lenrek
6025ad06da merge 2013-05-27 01:20:46 +02:00
cinap_lenrek
44e4aad870 kernel: dont copy fpsave on fork, simplify freeing waitq in pexit(), remove unused semlock from Proc sturcure 2013-05-27 01:17:11 +02:00
cinap_lenrek
410d6bea6a devfs/devsd: fix waserror() and unused variable compiler problem
the compiler optimizes setting unused variables out, which is
problematic if they are used in waserror() handler which the
compiler isnt aware of. rearrange the code to avoid this problem.
2013-05-27 01:12:21 +02:00
cinap_lenrek
c4153b7755 kernel: closechanq error
catch potential interrupt error from kproc(). this can happen when
we run out of processes, then newproc() will call rsrcwait()
which does tsleep(). if the process gets a note, this might
raise a interrupt error.
2013-05-27 01:09:34 +02:00
cinap_lenrek
24b908be8a kernel: image reclaim pauses
get a bit more verbose about process image exhaustion and make
imagreclaim() try to get at least one image on the freelist.

use rsrcwait() to notify the state, and call freebroken() in
case imagereclaim() couldnt free any images.
2013-05-27 01:04:53 +02:00
cinap_lenrek
3e567afed5 kernel: fix sysexec() error handling compiler problem, sysrendez() busyloop
the variables elem and file0 and commited are explicitely
set to avoid that they get freed in ther waserror() handlers.

but it turns out the compiler optimizes this out as he
thinks the variables arent used any further. (the compiler
is not aware of the waserror() / longjmp() semantics).

rearrange the code to account for this. instead of using
a local variable to check for point of no return (commited),
we use up->seg[SSEG] to figure it out.

for file0 and elem, we just rearrange the code. elem can be
checked in the error handler if it was already assigned to
up->text, and file0 is just free()'d after the poperror().

remove silly busy loop in sysrendez. it is not needed.
dequeueproc() will make sure that the process has come to
rest.
2013-05-27 00:59:43 +02:00
cinap_lenrek
257c7e958e keep fpregs always in sse (FXSAVE) format, adapt libmach and acid files for new format
we now always use the new FXSAVE format in FPsave structure and fpregs
file, converting back and forth in fpx87save() and fpx87restore().

document that fprestore() is a destructive operation now.

change fp register definition in libmach and adapt fpr() acid funciton.

avoid unneccesary copy of fpstate and fpsave in sysfork(). functions
including syscalls do not preserve the fp registers and copying fpstate
from the current process would mean we had to fpsave(&up->fpsave); first.
simply not doing it, new process starts in FPinit state.
2013-05-26 22:41:40 +02:00
cinap_lenrek
ef5e19b9be add leading dot for explicit domain in webcookies, bump redirection limit to 12 in webfs 2013-05-26 03:33:39 +02:00
cinap_lenrek
7aea1204b9 graphics(2): remove non existing char *mousedir argument from geninitdraw (from sources / geninitdraw-no-mousedir patch) 2013-05-25 04:39:53 +02:00
cinap_lenrek
cf657b418b libdraw: fix agefont crash when display == nil (from sources / agefont-nodisplay patch)
If you run this:
	{for (i in `{seq 1 70000}) echo '½•α·'} | mc | wc
mc will eventually suicide. The error comes from
/sys/src/libdraw/font.c:/^agefont which assumes it has a
display. Normally, this is set up by geninitdraw (usually
via initdraw), but mc.c avoids that to avoid the screen
redraws (flicker, at a minimum, but worse in long-running
cases).

graphics(2) does not prohibit this use, so I made the least
intrusive change to make it work.
2013-05-25 04:36:16 +02:00
cinap_lenrek
96511b274d kernel: fix floating point exceptions (was broken by sse kernel changes)
the fpenv() instruction stores in x87 format, using mathstate()
would interpret fpsave as FPssestate in case it was enabled!
instead, pass the status word and fppc explicitely to mathnote()
in matherror().

get rid of m->fpsavealign buffer, as we can just use FPssesave struct
which has enougth padding so rounding up base pointer will not overflow.
2013-05-25 22:44:19 +02:00
cinap_lenrek
8b40eecea8 kernel: cleanup /sys/src/9/pc/mkfile PORT= and OBJ= lists 2013-05-21 19:45:40 +02:00
cinap_lenrek
92b550d665 kernel: prevent alarm(2) from returning instantly when the tick timer wraps. (from erik quanstros alarmwrap patch) 2013-05-21 19:31:41 +02:00
cinap_lenrek
f6833ce428 wifi: properly size internal wifi input processing queue
we only used wifi->iq to process management frames only, now its also used
to forward encrypted data frames, so size it accordingly.
2013-05-21 19:29:57 +02:00
cinap_lenrek
7a9ecbed6a merge 2013-05-21 18:58:13 +02:00
jpathy
5331734335 merge 2013-05-22 21:55:08 +05:30
jpathy
81b7451972 sse kernel support (sources) 2013-05-22 23:47:05 +05:30
jpathy
213bf50893 add 6(a|l) sse support to 8(a|l) 2013-05-21 23:15:13 +05:30
cinap_lenrek
8a3a36fc05 kernel: make allocb() wait instead of panic() when possible
as long as our process doesnt hold any locks or ilocks, we
can try to wait for the memory to become available instead of
panicing.
2013-05-21 02:29:46 +02:00
cinap_lenrek
58201a67c1 uarti8250: print on malloc failure 2013-05-20 17:43:30 +02:00
cinap_lenrek
3ccf5db688 merge 2013-05-20 17:33:46 +02:00
cinap_lenrek
c4f57ff492 pcuart: malloc error handling, cleanup 2013-05-20 17:32:48 +02:00
ftrvxmtrx
5aa2a1a845 kbmap/ua: fix uppercase ь 2013-05-20 13:48:09 +02:00
cinap_lenrek
6ac8a3ca65 devether: handle malloc error in etherprobe() 2013-05-20 01:17:38 +02:00
cinap_lenrek
926dd18a7a wifi: handle malloc errors in wifiattach() 2013-05-20 01:03:20 +02:00
cinap_lenrek
18b8ae56e8 use resrcwait() when waiting for memory to become available
use resrcwait() when waiting for memory to become available. randomize
the sleep time and properly restore old process status in case tsleep()
gets interrupted.
2013-05-20 23:55:38 +02:00
cinap_lenrek
f97798e710 devsd: don't raise Enomem error if sdmalloc() fails, instead wait for the memory to become available
filesystems do not handle i/o errors well (cwfs will abandon the blocks),
and temporary exhaustion of kernel memory (because of too many i/o's in
parallel) causes read and write on the partition to fail.

i think it is better to wait for the memory to become available in
this case. the single allocation is at max SDmaxio bytes, which makes
it likely to become available. if we havnt even enought fo that, then
rebooting the machine would be the best option. (aux/reboot)
2013-05-19 20:59:55 +02:00
ftrvxmtrx
318cd6fbde kbmap/ru: fix uppercase ь 2013-05-19 17:50:51 +02:00
cinap_lenrek
4c6c7be688 nusb/kb: simplify repeat logic as scancode now contains the info about esc1 extension 2013-05-18 01:46:25 +02:00
ftrvxmtrx
506cae05df nusb/kb: oops, fixup 2013-05-18 01:03:13 +02:00
ftrvxmtrx
811c3e8d78 nusb/kb: use a flag to indicate extended code; fix the most unix-friendly key on se/fi kbd layout 2013-05-18 01:01:34 +02:00
stanley lieber
d50ca72774 faces: just say no to dejavu 2013-05-15 15:38:42 -04:00
cinap_lenrek
172b290e05 netaudit: check if ipgw= is an ip address 2013-05-14 18:54:42 +02:00
cinap_lenrek
4c6fa55456 make clear that the "ipgw" attribute has to be an ip address 2013-05-14 18:31:24 +02:00
stanley lieber
9e9521140d fortunes: Subject: [9fans] [gsoc] Dart9P 2013-05-14 10:18:49 -04:00
cinap_lenrek
f990a6d30a rio: place text at beginning of line before cursor and host point 2013-05-13 04:40:02 +02:00
cinap_lenrek
303394314a rio: fix completion and readback and make it possible to complete history 2013-05-13 04:19:10 +02:00
ppatience0
7b4c8aac93 toppm: no need to initialize err 2013-05-12 18:00:47 -04:00
ppatience0
03d1d83deb toppm: checking for err is useless; it was initialized to nil earlier 2013-05-12 17:52:35 -04:00
ppatience0
df25791b33 toppm: multichan converts to RGB24, not RGBV 2013-05-12 17:46:39 -04:00
ppatience0
eee0141465 writeppm: replace WriteGIF by WritePPM 2013-05-12 17:08:52 -04:00
cinap_lenrek
6bcc1eb399 writeppm: simplify 2013-05-13 23:03:23 +02:00
ppatience0
a3f776a13e writeppm: for bitmaps, 1 is black, 0 is white 2013-05-12 16:36:29 -04:00
ppatience0
a1130d843d toppm: fix style 2013-05-12 16:17:09 -04:00
ppatience0
d5e3e4326c toppm: add -r flag for raw ppm 2013-05-12 16:11:43 -04:00
cinap_lenrek
b78e9525cf writeppm: fix tab/spaces 2013-05-12 19:12:21 +02:00
cinap_lenrek
4c4fbdf78c merge 2013-05-12 19:05:51 +02:00
cinap_lenrek
3cccb8fb12 devaoe: avoid panic on malloc() error by using smalloc() instead. 2013-05-12 19:04:07 +02:00