Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								3f3535213b 
								
							 
						 
						
							
							
								
								Fix some issues uncovered by the spawn stress test.  
							
							
							
						 
						
							2018-12-26 22:02:24 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								f6179ad9f9 
								
							 
						 
						
							
							
								
								Add slightly better kmalloc_aligned() and kfree_aligned().  
							
							... 
							
							
							
							Process page directories can now actually be freed. This could definitely
be implemented in a nicer, less wasteful way, but this works for now.
The spawn stress test can now run for a lot longer but eventually dies
due to kmalloc running out of memory. 
							
						 
						
							2018-12-26 21:47:15 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								55c722096d 
								
							 
						 
						
							
							
								
								Process::create_user_process() shouldn't leak a process if exec() fails.  
							
							
							
						 
						
							2018-12-26 21:04:27 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								2f010e941c 
								
							 
						 
						
							
							
								
								Unbreak the spawn stress test.  
							
							
							
						 
						
							2018-12-26 20:57:51 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								12a6963a5d 
								
							 
						 
						
							
							
								
								Fix bug where Vnode kept its Inode alive indefinitely.  
							
							
							
						 
						
							2018-12-24 23:24:49 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								033a42b580 
								
							 
						 
						
							
							
								
								The syncd loop can just be a lambda.  
							
							
							
						 
						
							2018-12-24 23:10:48 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								503e32552c 
								
							 
						 
						
							
							
								
								Move kernel symbolication code out of init.cpp and into its own KSym files.  
							
							... 
							
							
							
							Also use a simple array of { dword, const char* } for the KSyms and put the
whole shebang in kmalloc_eternal() memory. This was a fugly source of
kmalloc perma-frag. 
							
						 
						
							2018-12-24 23:01:09 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								6a9fa3e41a 
								
							 
						 
						
							
							
								
								Let sys$sigaction() fail if called with SIGKILL or SIGSTOP.  
							
							
							
						 
						
							2018-12-24 22:22:35 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								7bc41532be 
								
							 
						 
						
							
							
								
								Remove FS::read_entire_inode() in favor of Inode::read_entire().  
							
							
							
						 
						
							2018-12-21 17:45:42 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								3a0a8848fb 
								
							 
						 
						
							
							
								
								Make syscall invocations look pleasant.  
							
							... 
							
							
							
							Old: Syscall::invoke(Syscall::SC_foo, (dword)arg1, (dword)arg2)
New: syscall(SC_foo, arg1, arg2) 
							
						 
						
							2018-12-21 03:02:06 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								36bd53b36a 
								
							 
						 
						
							
							
								
								Add a simple /bin/more.  
							
							
							
						 
						
							2018-12-21 02:42:30 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								4dd50b1f6d 
								
							 
						 
						
							
							
								
								Get rid of three test utilities that I no longer need.  
							
							
							
						 
						
							2018-12-21 02:22:21 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								ec1c487dcd 
								
							 
						 
						
							
							
								
								Yet another pass of style fixes.  
							
							
							
						 
						
							2018-12-21 02:10:45 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								89040cdc99 
								
							 
						 
						
							
							
								
								Add a "syncd" kernel process that periodically calls sync().  
							
							
							
						 
						
							2018-12-20 02:41:55 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								ed7ae6c02c 
								
							 
						 
						
							
							
								
								Add sync() syscall and a /bin/sync.  
							
							... 
							
							
							
							It walks all the live Inode objects and flushes pending metadata changes
wherever needed.
This could be optimized by keeping a separate list of dirty Inodes,
but let's not get ahead of ourselves. 
							
						 
						
							2018-12-20 00:39:29 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								d0f06e5f3f 
								
							 
						 
						
							
							
								
								Automatically call Inode::flush_metadata() before an Inode is destroyed.  
							
							... 
							
							
							
							Use a little template magic to have Retainable::release() call out to
T::will_be_destroyed() if such a function exists before actually calling
the destructor. This gives us full access to virtual functions in the
pre-destruction code. 
							
						 
						
							2018-12-19 22:28:09 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								1f44cd9dd9 
								
							 
						 
						
							
							
								
								Reworked Inode to have a dirty bit and subclass-implemented flush_metadata().  
							
							... 
							
							
							
							This way we can defer disk writes as long as we like. There's no automatic
flushing happening just yet. 
							
						 
						
							2018-12-19 21:56:45 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								d506c857ab 
								
							 
						 
						
							
							
								
								Rename CoreInode to Inode.  
							
							... 
							
							
							
							I don't know what I was thinking here. Clearly Inode is the right name. 
							
						 
						
							2018-12-19 21:18:28 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								038d8641f9 
								
							 
						 
						
							
							
								
								Implement utime() along with a naive /bin/touch.  
							
							... 
							
							
							
							This synchronous approach to inodes is silly, obviously. I need to rework
it so that the in-memory CoreInode object is the canonical inode, and then
we just need a sync() that flushes pending changes to disk. 
							
						 
						
							2018-12-19 21:14:55 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								4f6438ec66 
								
							 
						 
						
							
							
								
								VirtualConsole: Support the 'A' and 'D' CSI sequences.  
							
							... 
							
							
							
							This makes backspace work correctly when line editing with bash-2.05b. 
							
						 
						
							2018-12-07 01:19:02 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								a8c7b6ce86 
								
							 
						 
						
							
							
								
								VirtualConsole: The rightmost column is always a default horizontal tab.  
							
							
							
						 
						
							2018-12-07 00:26:12 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								2850225587 
								
							 
						 
						
							
							
								
								VirtualConsole: Don't output the bell character.  
							
							
							
						 
						
							2018-12-07 00:21:25 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								87b10f6e6e 
								
							 
						 
						
							
							
								
								Add basic support for horizontal tabs in the VirtualConsole.  
							
							
							
						 
						
							2018-12-07 00:19:08 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								ca6847b5bb 
								
							 
						 
						
							
							
								
								Import a simple text editor I started working on.  
							
							
							
						 
						
							2018-12-04 00:27:16 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								405383fd2f 
								
							 
						 
						
							
							
								
								Refactor the FIFO implementation to use a DoubleBuffer as backing store.  
							
							... 
							
							
							
							This is considerably more efficient than using a CircularQueue. 
							
						 
						
							2018-12-03 02:24:11 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								afc56d151f 
								
							 
						 
						
							
							
								
								Omit duplicate lines from the ksyms map.  
							
							
							
						 
						
							2018-12-03 02:23:49 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								bbfae19238 
								
							 
						 
						
							
							
								
								Move DoubleBuffer to its own files.  
							
							
							
						 
						
							2018-12-03 01:51:44 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								aff89d2fd7 
								
							 
						 
						
							
							
								
								Yet more coding style fixes.  
							
							
							
						 
						
							2018-12-03 01:38:22 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								f31e1ceab0 
								
							 
						 
						
							
							
								
								Move InlineLinkedList to AK.  
							
							
							
						 
						
							2018-12-03 01:18:54 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								e7cc08226f 
								
							 
						 
						
							
							
								
								Implement basic support for times().  
							
							... 
							
							
							
							The kernel now bills processes for time spent in kernelspace and userspace
separately. The accounting is forwarded to the parent process in reap().
This makes the "time" builtin in bash work. 
							
						 
						
							2018-12-03 01:14:19 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								4bc87dc7b9 
								
							 
						 
						
							
							
								
								Share the "blocked-on file descriptor" number between read() and write().  
							
							... 
							
							
							
							A process can't be reading and writing at the same time, so it's fine for
them to share the variable for the blocked FD. 
							
						 
						
							2018-12-03 00:42:48 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								f6e27c2abe 
								
							 
						 
						
							
							
								
								More coding style changes.  
							
							
							
						 
						
							2018-12-03 00:39:25 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								407bb3e76e 
								
							 
						 
						
							
							
								
								Some coding style fixes. I'm getting more comfortable with this style.  
							
							
							
						 
						
							2018-12-03 00:20:00 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								85b886c2e0 
								
							 
						 
						
							
							
								
								Make it possible to build the Kernel on a macOS host.  
							
							... 
							
							
							
							It still requires an ELF compiler and linker, but at least it builds.
I need to get rid of the "Unix" namespace. This does a lot of that. 
							
						 
						
							2018-12-02 23:34:50 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								44036f32bc 
								
							 
						 
						
							
							
								
								Move ELFLoader code into Kernel/.  
							
							
							
						 
						
							2018-12-02 20:27:08 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								ac7a60225e 
								
							 
						 
						
							
							
								
								Add TIOCGWINSZ ioctl so userland can determine terminal geometry.  
							
							... 
							
							
							
							(Don't) use this to implement short-form output in ls.
I'm too tired to make a nice column formatting algorithm.
I just wanted something concise when I type "ls". 
							
						 
						
							2018-11-29 03:45:23 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								f5a83c4d8a 
								
							 
						 
						
							
							
								
								Fix bug where a signal-interrupted waitpid() wouldn't return EINTR.  
							
							
							
						 
						
							2018-11-28 23:30:49 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								464a16afa2 
								
							 
						 
						
							
							
								
								Implement signal() via sigaction() and get rid of sys$signal().  
							
							
							
						 
						
							2018-11-28 22:27:32 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								d90104f9e0 
								
							 
						 
						
							
							
								
								Let reap() communicate the dead process's exit status to the caller.  
							
							... 
							
							
							
							This way the scheduler doesn't need to plumb the exit status into the waiter.
We still plumb the waitee pid though, I don't love it but it can be fixed. 
							
						 
						
							2018-11-28 22:01:24 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								938d1b8bfb 
								
							 
						 
						
							
							
								
								Drop any old signal stacks on exec().  
							
							
							
						 
						
							2018-11-28 20:59:10 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								629c5be10b 
								
							 
						 
						
							
							
								
								Add basic zero faults.  
							
							... 
							
							
							
							mmap() will now map uncommitted pages that get allocated and zeroed upon the
first access. I also made /proc/PID/vm show number of "committed" bytes in
each region. This is so cool! :^) 
							
						 
						
							2018-11-19 02:17:20 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								e88f306d07 
								
							 
						 
						
							
							
								
								Make /proc/PID/vm more readable.  
							
							... 
							
							
							
							And move the unreadable detail-heavy mess to /proc/PID/vmo. 
							
						 
						
							2018-11-19 01:49:19 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								de4604ac95 
								
							 
						 
						
							
							
								
								Finally hook up the mkdir code to a syscall.  
							
							... 
							
							
							
							Added a /bin/mkdir that makes directories. How very neat :^)
There are various limitations because of missing functionality. 
							
						 
						
							2018-11-18 15:02:16 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								95e0f6ad82 
								
							 
						 
						
							
							
								
								Fix race condition in exec().  
							
							... 
							
							
							
							...also hook up sys$fstat in the syscall dispatcher. 
							
						 
						
							2018-11-17 00:52:29 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								bb9766ee17 
								
							 
						 
						
							
							
								
								Tweak default hostname.  
							
							
							
						 
						
							2018-11-17 00:23:39 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								9d05f6b7a7 
								
							 
						 
						
							
							
								
								Make bash-2.05b build with minimal changes.  
							
							... 
							
							
							
							This is really neat. :^) 
							
						 
						
							2018-11-17 00:14:07 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								2cf477a151 
								
							 
						 
						
							
							
								
								Add fcntl() F_DUPFD which is slightly different from dup2().  
							
							
							
						 
						
							2018-11-16 22:14:40 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								6cedb88153 
								
							 
						 
						
							
							
								
								Don't unblock a blocked process when it ignores a signal.  
							
							
							
						 
						
							2018-11-16 21:14:25 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								a788e85c09 
								
							 
						 
						
							
							
								
								Refactor TTY signal generation a bit.  
							
							... 
							
							
							
							We now respect the VINTR and VQUIT control characters in the termios. 
							
						 
						
							2018-11-16 20:18:58 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								4e2c2b9748 
								
							 
						 
						
							
							
								
								Minor TTY tweak.  
							
							
							
						 
						
							2018-11-16 18:12:22 +01:00