Theodore Dubois
ba78d23f96
Add file I forgot to commit
2020-02-17 13:35:32 -08:00
Theodore Dubois
8ff84f2ae3
Handle different clock IDs in timerfd_create
...
Also handle TFD_TIMER_ABSTIME in timerfd_settime.
Fix #591
2020-01-03 20:13:17 -08:00
Theodore Dubois
ecd2e947ed
Stop timers from spinning after they've been freed
2019-12-21 20:06:53 -08:00
Theodore Dubois
ded73c4943
Fix LOCK_DEBUG being on by default
2019-11-23 19:35:44 -08:00
Theodore Dubois
99444b92d8
Update lock debug data during a wait_for
2019-09-08 21:40:40 -07:00
Theodore Dubois
0f2b5d3688
Slightly improve wait_for's pending signal check
2019-08-11 14:36:45 -07:00
Theodore Dubois
7123f95eb5
Even more correctly handle signals sent during a sigsuspend()
2019-08-11 14:36:45 -07:00
Theodore Dubois
c41dd566c0
Correctly handle signals sent during a sigsuspend()
2019-07-27 14:55:03 -07:00
Theodore Dubois
71c5ef43ad
Implement fcntl file locks
2019-02-02 23:08:05 -08:00
Theodore Dubois
2f8c0afcbf
Add sockrestart infrastructure
2019-01-26 17:39:22 -08:00
Theodore Dubois
90825eaf02
Add lock debugging helper code
2019-01-22 11:46:11 -08:00
Theodore Dubois
088e7b727d
Implement ptys
...
Also a bunch of somewhat related changes, I was too lazy to break this into more than one commit
2019-01-21 12:20:43 -08:00
Theodore Dubois
051d7a2e25
Really fix UAF when destroying a timer
2019-01-08 09:24:46 -05:00
Theodore Dubois
29c2755f2f
Fix UAF when destroying a timer
2019-01-06 09:20:14 -08:00
Theodore Dubois
b1c7f036b5
Make fifo less segfaulty
2019-01-06 08:04:28 -08:00
Theodore Dubois
a0ca767db6
Rewrite syslog buffer to use a generic fifo
...
Trivia: I wrote this ring buffer implementation in half an hour during a Google interview and it somehow works better than the old one which took me half a day.
2019-01-05 17:24:32 -08:00
Theodore Dubois
6406cf3719
Fix condition static initializer
2019-01-01 13:14:40 -08:00
Theodore Dubois
6dca791a13
Fix memory leak of timers
2018-12-31 17:30:10 -08:00
Theodore Dubois
e6eb2acbc4
Implement /proc/pid/stat
2018-12-24 23:12:35 -08:00
Theodore Dubois
f8028736b4
Make mounting filesystems possible
2018-12-22 19:38:41 -08:00
Theodore Dubois
238103c979
Pass &lock->m to pthread functions
2018-12-01 14:11:37 -08:00
Theodore Dubois
7d0e083098
Don't freeze the main thread when tapping the screen
2018-11-30 12:32:51 -08:00
Theodore Dubois
fc157975f7
Return errors for futex timeouts
2018-11-14 13:23:38 -08:00
Ryan Hileman
277dd12e49
implement futex timeouts
2018-11-14 12:13:35 -08:00
Theodore Dubois
8a63e1c9fb
Don’t call the timer callback if the timer isn’t running
2018-11-12 10:52:59 -08:00
Theodore Dubois
12e405817d
Ignore signals when waiting for vfork completion
2018-11-12 10:43:23 -08:00
Theodore Dubois
fa75b91382
Fix one-shot timers
2018-11-12 10:10:55 -08:00
Theodore Dubois
936e806daa
Destroy the memory lock
2018-11-10 13:02:03 -08:00
Theodore Dubois
7a91160b30
Try a completely different implementation of interrupting waits
2018-11-09 13:56:08 -08:00
Theodore Dubois
3d52f2d01a
Make new condition implementation work on Darwin
2018-11-08 19:28:11 -08:00
Theodore Dubois
12ed53a493
Introduce a replacement for pthread conditions and use that to make exit_group work
2018-11-08 18:57:06 -08:00
Theodore Dubois
3cf7619de7
Merge branch 'jit'
2018-08-12 19:35:43 -07:00
Theodore Dubois
cd310198c6
Fix various blockchain bugs
2018-06-01 11:34:12 -07:00
Theodore Dubois
ab3beead9b
Stop including mach headers from util/timer.h
...
This was causing PAGE_SIZE to be redefined after it was defined in
emu/memory.h
2018-04-18 17:20:40 -07:00
Theodore Dubois
5fee551307
Implement close on exec
2018-01-19 16:44:34 -08:00
Theodore Dubois
b92789385b
Fix race conditions in timer
2018-01-14 18:46:41 -08:00
Theodore Dubois
77f9c73be9
Remove magic from locking macros
2018-01-14 18:18:12 -08:00
Theodore Dubois
fa6a1a9fdd
Remove useless circular buffer
2018-01-14 16:34:11 -08:00
Theodore Dubois
5d2fdd3e18
Reduce magic in locking macros
2017-12-19 22:48:43 -08:00
Theodore Dubois
da7d1a6a82
Detach threads after creating them, unlock mutexes before freeing them
2017-12-18 16:27:49 -08:00
Theodore Dubois
3c15e79178
Add locking to timer
2017-12-17 20:05:59 -08:00
Theodore Dubois
7dbd316399
Use monotonic time for timers
2017-12-08 11:13:16 -08:00
Theodore Dubois
5bfda67bd1
Make the timer actually fire
2017-10-16 14:06:57 -07:00
Theodore Dubois
a08a34a62f
Implement thread-based timer architecture
2017-10-14 15:57:12 -07:00
Theodore Dubois
f1e63c43e0
Rename sys directory to kernel
...
A number of the headers in it were conflicting with macOS system
headers.
2017-10-13 16:54:11 -07:00
Theodore Dubois
bee46f41de
Reinitialize the list of children of a brand new process
...
This fixes a bug where if you start a shell from a shell, the inner
shell would call waitpid(-1) and that would get stuck in an infinite
loop over garbage child process data.
2017-10-12 17:20:23 -07:00
Theodore Dubois
0c5663cbe6
Add support for polling real fds
2017-09-19 17:40:44 -07:00
Theodore Dubois
2bca06f83c
Rollback to filesystem with paths
2017-09-13 12:56:52 -07:00
Theodore Dubois
274b7531af
Refactor filesystem to not use paths
2017-09-06 15:39:04 -07:00
Theodore Dubois
7f374aca2b
Make ctrl-c work
2017-09-02 16:10:42 -07:00