Commit Graph

58 Commits

Author SHA1 Message Date
Kevin Lange
4a36d6bb9e Fix a potential deadlock and improve irq on/off 2015-04-13 23:39:23 -07:00
Kevin Lange
d3cddf169a And then some more magic to merge the vimhints and the copyright headers 2014-06-07 23:58:31 -07:00
Kevin Lange
1287af81ef Reinsert vim hints magically 2014-06-07 23:51:01 -07:00
Kevin Lange
a2ed4b4f0e strip vim: lines from kernel 2014-06-07 23:43:21 -07:00
Kevin Lange
ef7d72c1e1 License headers and a tool to generate them 2014-06-07 23:13:29 -07:00
Kevin Lange
dcaa023347 Processes now inherit names 2014-06-07 18:32:10 -07:00
Kevin Lange
252fe84ab0 Close and cleanup before we reap. 2014-05-27 23:20:02 -07:00
Kevin Lange
d696f51f8b Real unix pipes 2014-05-27 21:38:30 -07:00
Kevin Lange
dff654ae93 Reduce debug messages for waitpid to INFO level 2014-05-18 10:27:28 -07:00
Kevin Lange
4d8335ad75 Implement proper wait/waitpid.
This is a pretty big commit, so let's run through it in parts:

- All of the userspace changes are to switch away from syscall_wait
  Mostly, this is to waitpid; some things were tweaked to do things
  "properly" instead of waiting for particular processes. Init has
  been fixed to do a proper spin wait.
- syscall_wait is gone - as are its uses. newlib bindings have been
  using just waitpid for a while now.
- waitpid now performs like a Unix waitpid
- process reaping is no longer a "do this on next change thing":
  it happens when a process is waited on, like it should
  (That means we can have real zombies: terminated processes that
  have not yet been waited on)
- Reparenting of children to init has been implemented, so you
  can fork-daemonize!

Overall, this is pretty big... So I hope it doesn't break everything.
2014-04-27 01:37:33 -07:00
Kevin Lange
c31bedd69e Let's just ... not do that 2014-04-21 19:40:28 -07:00
Kevin Lange
d967fae3a5 Track down the root of that malloc problem 2014-04-20 13:19:52 -07:00
Kevin Lange
d99dc5688e Fix a glitch with signal handling 2014-04-19 19:10:22 -07:00
Kevin Lange
9ad1b50cb8 Change how we determine that a process is in a queue 2014-04-13 02:05:12 -07:00
Kevin Lange
d43f517464 Remove a lock from something that shouldn't be locking anyway 2014-04-13 02:05:01 -07:00
Kevin Lange
7cb739b7cd Fix signalled wakeups from timed sleeps 2014-04-12 18:25:56 -07:00
Kevin Lange
ed6dc9507d Fix signal wakeups from existing sleeps 2014-04-12 18:15:28 -07:00
Kevin Lange
a9b9c2e20d Random header cleanup 2014-04-05 16:36:17 -07:00
Kevin Lange
51d398fc76 Remove special handling for tty access, make init do it 2014-04-05 15:43:14 -07:00
Kevin Lange
7dd6646ae3 Logging tweaks to kill some kprintfs 2014-04-05 15:05:24 -07:00
Kevin Lange
f8deaed26a Dirty hack to fix breakage when nothing is running 2014-04-04 21:30:14 -07:00
Kevin Lange
10f4cc6811 Tasklets; fix dead sleep; kernel serial console
- Tasklets are essentially kernel threads. Still working on passing
  arguments to them, but they essentially just run functions and have
  special names like [[kttydebug]]. Eventually, I want disk scheduling
  and various (non-interrupt-driven) drivers running on these, but I'm
  still not sure how stable they are.
- Fix the scheduler so it supports not having anything to run. This took
  some tracking of what's running, and then inserting some liberal
  sleeps. Doesn't appear to break anything. Makes the system work when
  you try to sleep with only one process "running", so that's good.
- Start working on reimplementing the old kernel shell, but this time as
  a tasklet running in the background over serial. Probably going to try
  to add all the same features as before (tab completion, history, rich
  editing), but it may take some time to get it all in there. This
  console is mostly focused on helping with debugging EXT2 and other
  future stuff.
2013-11-27 19:11:58 -08:00
Kevin Lange
40f0c41932 Preliminary termios support
This is some initial work on support real PTYs.
Canonical mode is not supported at the moment.
2013-07-27 00:18:29 -07:00
Kevin Lange
0f344f2900 Rewrite fork/clone.
This is still a bit ugly, needs cleanup.
Fixes that weird GCC issue.
2013-06-06 18:04:13 -07:00
Kevin Lange
e70ebf8857 Big fat cleanup and GCC fix batch 2013-06-05 23:10:36 -07:00
Kevin Lange
a2a890e1a8 Fresh new VFS syscalls: unlink, chmod, umask 2013-04-23 01:14:33 -07:00
Kevin Lange
ade59a11bc XXX ABI BREAKING CHANGE - New load/heap/stack/shm
Address for program loading, kernel heap, userspace SHM regions, and
stacks have been changed.

Delete:
  toolchain/build
  toolchain/local
  .userspace_check

Run:
  python userspace/build.py clean
  make clean-disk
  make clean
  ./build.sh
2013-04-21 17:35:03 -07:00
Kevin Lange
2de26fafe1 Lazy FPU/SSE, more correct-er 2013-04-16 00:03:23 -07:00
Kevin Lange
bc2e4741c7 Random bits and pieces 2013-03-22 15:11:19 -07:00
Kevin Lange
ef459bdaad More rough stubs and fixes 2013-03-20 21:24:55 -07:00
Kevin Lange
6f94ce2296 procfs extensions and ps command 2013-03-18 21:52:45 -07:00
Kevin Lange
e223c57af8 Reserve some entries for process scheduling 2013-03-17 16:33:28 -07:00
Kevin Lange
3a977369af Timed process sleeping (and bug fixes) 2012-12-10 20:28:31 -08:00
Kevin Lange
3a45200d3d lol wat 2012-12-02 22:16:59 -08:00
Kevin Lange
193158079d Bunch of kernel cleanup 2012-11-30 18:26:47 -08:00
Kevin Lange
ed5b9543fb Big commit: Serial console
* fix some terminal bugs (some, not all)
* add a serial device to the VFS
* fix up serial so it works better
* add a serial-console application
* fix a bug in some other stuff relating to allocations
* change size of the terminal described by toaru.terminfo
* adds a new system call
2012-11-28 23:05:19 -08:00
Kevin Lange
8ed06789ed New debug printing facilities.
- Can now register a userspace file descriptor as the output for kernel
  print statements through kprintf()
- Can set logging levels for debug print messages, which are separate
  from kernel log events and meant to be more readily visible. Log
  events are recorded in a buffer to be viewed later, though nothing
  actually using logging at the moment.
- Serial output is disabled by default now. You can enable it yourself
  by appending the logtoserial argument to the kernel on boot.
2012-09-03 22:35:11 -07:00
Kevin Lange
816ddc8f3e Lots of process cleanup implemented; improved cursor rendering 2012-03-14 22:03:55 -05:00
Kevin Lange
e586a9361d No, I was an idiot. 2012-03-10 12:42:23 -06:00
Kevin Lange
1c288e1c8b We never freed nodes from the scheduler queue :( 2012-03-10 12:39:35 -06:00
Kevin Lange
de7a984938 Fix a bunch of bugs in signal handling and scheduling 2012-02-20 23:31:00 -06:00
Kevin Lange
a72f9bc7cf Fix stack bug. 2012-02-16 14:31:40 -06:00
Markus Schober
4453aba2de can haz threads? 2012-02-15 22:56:16 -06:00
Markus Schober
45903b204b fixed a subtle bug in shm; added a bunch of utilities to test it 2012-02-10 22:31:38 -06:00
Kevin Lange
180342822a Merge branch 'master' of github.com:klange/osdev 2012-02-08 20:09:33 -06:00
Kevin Lange
79fcaf5136 Stability fixes. 2012-02-08 20:09:28 -06:00
Markus Schober
27d0deed5b [shm] fork() and execve() don't wreak havoc on shm 2012-02-08 19:59:34 -06:00
Kevin Lange
65fa12f482 SIGNALS 2012-02-08 02:40:44 -06:00
Markus Schober
aec24c08f1 Attaching nearly works! 2012-02-07 02:29:28 -06:00
Kevin Lange
89d9265c73 Actually deschedule processes when they are waiting 2012-01-31 19:27:38 -06:00