Rev |
Age |
Author |
Path |
Log message |
Diff |
Changes |
3438 |
5818 d 21 h |
svoboda |
/trunk/ |
Merge syscall tracer (trace) and relevant part of udebug interface from tracing to trunk. |
|
/trunk/kernel/generic/include/ipc/ipc_kbox.h /trunk/kernel/generic/include/udebug /trunk/kernel/generic/include/udebug/udebug.h /trunk/kernel/generic/include/udebug/udebug_ipc.h /trunk/kernel/generic/include/udebug/udebug_ops.h /trunk/kernel/generic/src/ipc/ipc_kbox.c /trunk/kernel/generic/src/udebug /trunk/kernel/generic/src/udebug/udebug.c /trunk/kernel/generic/src/udebug/udebug_ipc.c /trunk/kernel/generic/src/udebug/udebug_ops.c /trunk/uspace/app/trace /trunk/uspace/app/trace/Makefile /trunk/uspace/app/trace/errors.c /trunk/uspace/app/trace/errors.h /trunk/uspace/app/trace/ipc_desc.c /trunk/uspace/app/trace/ipc_desc.h /trunk/uspace/app/trace/ipcp.c /trunk/uspace/app/trace/ipcp.h /trunk/uspace/app/trace/proto.c /trunk/uspace/app/trace/proto.h /trunk/uspace/app/trace/syscalls.c /trunk/uspace/app/trace/syscalls.h /trunk/uspace/app/trace/trace.c /trunk/uspace/lib/libc/generic/udebug.c /trunk/uspace/lib/libc/include/udebug.h
/trunk/boot/arch/amd64/Makefile.inc /trunk/boot/arch/arm32/loader/Makefile /trunk/boot/arch/ia32/Makefile.inc /trunk/boot/arch/ia64/loader/Makefile /trunk/boot/arch/mips32/loader/Makefile /trunk/boot/arch/ppc32/loader/Makefile /trunk/boot/arch/ppc64/loader/Makefile /trunk/kernel/Makefile /trunk/kernel/generic/include/ipc/ipc.h /trunk/kernel/generic/include/ipc/sysipc.h /trunk/kernel/generic/include/proc/task.h /trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/include/syscall/syscall.h /trunk/kernel/generic/src/ipc/ipc.c /trunk/kernel/generic/src/ipc/sysipc.c /trunk/kernel/generic/src/main/uinit.c /trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c /trunk/kernel/generic/src/syscall/syscall.c /trunk/kernel/kernel.config /trunk/uspace/Makefile /trunk/uspace/lib/libc/Makefile /trunk/uspace/lib/libc/generic/ipc.c /trunk/uspace/lib/libc/include/ipc/ipc.h
|
3222 |
5889 d 17 h |
svoboda |
/trunk/ |
Merge program-loader related stuff from dynload branch to trunk. (huge) |
|
/trunk/kernel/generic/include/proc/program.h /trunk/kernel/generic/include/synch/smc.h /trunk/kernel/generic/src/proc/program.c /trunk/kernel/generic/src/synch/smc.c /trunk/uspace/app/cli /trunk/uspace/app/cli/Makefile /trunk/uspace/app/cli/cli.c /trunk/uspace/lib/libc/generic/pcb.c /trunk/uspace/lib/libc/generic/smc.c /trunk/uspace/lib/libc/include/ipc/loader.h /trunk/uspace/lib/libc/include/loader /trunk/uspace/lib/libc/include/loader/pcb.h /trunk/uspace/lib/libc/include/smc.h /trunk/uspace/srv/loader /trunk/uspace/srv/loader/Makefile /trunk/uspace/srv/loader/arch /trunk/uspace/srv/loader/arch/amd64 /trunk/uspace/srv/loader/arch/amd64/Makefile.inc /trunk/uspace/srv/loader/arch/amd64/_link.ld.in /trunk/uspace/srv/loader/arch/amd64/amd64.s /trunk/uspace/srv/loader/arch/arm32 /trunk/uspace/srv/loader/arch/arm32/Makefile.inc /trunk/uspace/srv/loader/arch/arm32/_link.ld.in /trunk/uspace/srv/loader/arch/arm32/arm32.s /trunk/uspace/srv/loader/arch/ia32 /trunk/uspace/srv/loader/arch/ia32/Makefile.inc /trunk/uspace/srv/loader/arch/ia32/_link.ld.in /trunk/uspace/srv/loader/arch/ia32/ia32.s /trunk/uspace/srv/loader/arch/ia64 /trunk/uspace/srv/loader/arch/ia64/Makefile.inc /trunk/uspace/srv/loader/arch/ia64/_link.ld.in /trunk/uspace/srv/loader/arch/ia64/ia64.s /trunk/uspace/srv/loader/arch/mips32 /trunk/uspace/srv/loader/arch/mips32/Makefile.inc /trunk/uspace/srv/loader/arch/mips32/_link.ld.in /trunk/uspace/srv/loader/arch/mips32/mips32.s /trunk/uspace/srv/loader/arch/ppc32 /trunk/uspace/srv/loader/arch/ppc32/Makefile.inc /trunk/uspace/srv/loader/arch/ppc32/_link.ld.in /trunk/uspace/srv/loader/arch/ppc32/ppc32.s /trunk/uspace/srv/loader/arch/sparc64 /trunk/uspace/srv/loader/arch/sparc64/Makefile.inc /trunk/uspace/srv/loader/arch/sparc64/_link.ld.in /trunk/uspace/srv/loader/arch/sparc64/sparc64.s /trunk/uspace/srv/loader/elf_load.c /trunk/uspace/srv/loader/include /trunk/uspace/srv/loader/include/arch.h /trunk/uspace/srv/loader/include/elf.h /trunk/uspace/srv/loader/include/elf_load.h /trunk/uspace/srv/loader/interp.s /trunk/uspace/srv/loader/main.c
/trunk/boot/arch/amd64/Makefile.inc /trunk/boot/arch/amd64/grub/menu.lst /trunk/boot/arch/arm32/loader/Makefile /trunk/boot/arch/ia32/Makefile.inc /trunk/boot/arch/ia32/grub/menu.lst /trunk/boot/arch/ia64/loader/Makefile /trunk/boot/arch/mips32/loader/Makefile /trunk/boot/arch/ppc32/loader/Makefile /trunk/boot/arch/sparc64/loader/Makefile /trunk/kernel/Makefile /trunk/kernel/arch/amd64/src/userspace.c /trunk/kernel/arch/arm32/src/userspace.c /trunk/kernel/arch/ia32/src/userspace.c /trunk/kernel/arch/ia32xen/src/userspace.c /trunk/kernel/arch/ia64/src/asm.S /trunk/kernel/arch/mips32/src/start.S /trunk/kernel/arch/ppc32/src/asm.S /trunk/kernel/arch/ppc64/src/asm.S /trunk/kernel/arch/sparc64/src/asm.S /trunk/kernel/generic/include/lib/elf.h /trunk/kernel/generic/include/mm/as.h /trunk/kernel/generic/include/proc/task.h /trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/include/syscall/syscall.h /trunk/kernel/generic/src/lib/elf.c /trunk/kernel/generic/src/main/kinit.c /trunk/kernel/generic/src/mm/as.c /trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c /trunk/kernel/generic/src/syscall/syscall.c /trunk/uspace/Makefile /trunk/uspace/app/init/init.c /trunk/uspace/app/tester/tester.c /trunk/uspace/lib/libc/Makefile /trunk/uspace/lib/libc/arch/amd64/src/entry.s /trunk/uspace/lib/libc/arch/arm32/src/entry.s /trunk/uspace/lib/libc/arch/ia32/src/entry.s /trunk/uspace/lib/libc/arch/ia64/src/entry.s /trunk/uspace/lib/libc/arch/mips32/src/entry.s /trunk/uspace/lib/libc/arch/ppc32/src/entry.s /trunk/uspace/lib/libc/arch/ppc64/src/entry.s /trunk/uspace/lib/libc/arch/sparc64/src/entry.s /trunk/uspace/lib/libc/generic/as.c /trunk/uspace/lib/libc/generic/io/stream.c /trunk/uspace/lib/libc/generic/libc.c /trunk/uspace/lib/libc/generic/task.c /trunk/uspace/lib/libc/include/as.h /trunk/uspace/lib/libc/include/io/stream.h /trunk/uspace/lib/libc/include/libc.h /trunk/uspace/lib/libc/include/task.h
|
3104 |
5922 d 2 h |
svoboda |
/trunk/kernel/ |
Declare arguments for memstr.h operations as pointers instead of uintptr_t. |
|
/trunk/kernel/Makefile /trunk/kernel/arch/amd64/include/memstr.h /trunk/kernel/arch/amd64/src/pm.c /trunk/kernel/arch/arm32/include/memstr.h /trunk/kernel/arch/ia32/include/memstr.h /trunk/kernel/arch/ia32/src/drivers/ega.c /trunk/kernel/arch/ia32/src/pm.c /trunk/kernel/arch/ia32/src/smp/smp.c /trunk/kernel/arch/ia32xen/src/ia32xen.c /trunk/kernel/arch/ia32xen/src/pm.c /trunk/kernel/arch/ia32xen/src/smp/smp.c /trunk/kernel/arch/ia64/include/memstr.h /trunk/kernel/arch/ia64/src/drivers/ega.c /trunk/kernel/arch/ia64/src/mm/vhpt.c /trunk/kernel/arch/mips32/include/memstr.h /trunk/kernel/arch/ppc32/include/memstr.h /trunk/kernel/arch/ppc64/include/memstr.h /trunk/kernel/arch/ppc64/src/mm/page.c /trunk/kernel/arch/sparc64/include/memstr.h /trunk/kernel/arch/sparc64/src/mm/as.c /trunk/kernel/genarch/src/mm/as_pt.c /trunk/kernel/genarch/src/mm/page_pt.c /trunk/kernel/generic/include/memstr.h /trunk/kernel/generic/src/adt/hash_table.c /trunk/kernel/generic/src/cpu/cpu.c /trunk/kernel/generic/src/ipc/ipc.c /trunk/kernel/generic/src/lib/memstr.c /trunk/kernel/generic/src/lib/objc_ext.c /trunk/kernel/generic/src/mm/as.c /trunk/kernel/generic/src/mm/backend_anon.c /trunk/kernel/generic/src/mm/backend_elf.c /trunk/kernel/generic/src/mm/slab.c /trunk/kernel/generic/src/proc/thread.c /trunk/kernel/test/mm/falloc2.c /trunk/kernel/test/mm/slab1.c /trunk/kernel/test/mm/slab2.c
|
3063 |
5924 d 19 h |
decky |
/trunk/kernel/generic/src/proc/ |
support for SYS_SPAWN syscall
proper printf formatting
change the way init tasks are created |
|
/trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c
|
2907 |
5946 d 18 h |
jermar |
/trunk/kernel/generic/src/proc/ |
Improve comment for thread_create(). |
|
/trunk/kernel/generic/src/proc/thread.c
|
2790 |
5989 d 23 h |
jermar |
/trunk/kernel/generic/src/proc/ |
Fix typo ALV tree vs. AVL tree. |
|
/trunk/kernel/generic/src/proc/thread.c
|
2712 |
6047 d 19 h |
decky |
/trunk/kernel/ |
prettyprint output |
|
/trunk/kernel/arch/amd64/src/debugger.c /trunk/kernel/arch/ia32/src/mm/frame.c /trunk/kernel/generic/include/macros.h /trunk/kernel/generic/src/interrupt/interrupt.c /trunk/kernel/generic/src/mm/frame.c /trunk/kernel/generic/src/printf/printf_core.c /trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c
|
2504 |
6234 d 14 h |
jermar |
/trunk/kernel/generic/ |
Give the AVL tree walkers the possibility to take an argument.
Each walker is now supposed to return a bool value to support walk termination.
Switch over from the tasks_btree B+tree to tasks_tree AVL tree.
This makes the fix for ticket #48 complete. |
|
/trunk/kernel/generic/include/adt/avl.h /trunk/kernel/generic/include/proc/task.h /trunk/kernel/generic/src/adt/avl.c /trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c
|
2502 |
6234 d 20 h |
jermar |
/trunk/kernel/generic/ |
Replace the threads_btree B+tree with an AVL tree. The new variable is called
threads_tree. For printing list of threads, use the new AVL tree walker
mechanism.
This solves half of ticket #48. |
|
/trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/src/proc/thread.c
|
2487 |
6261 d 15 h |
jermar |
/trunk/kernel/generic/src/proc/ |
Kernel stack address was printed twice. |
|
/trunk/kernel/generic/src/proc/thread.c
|
2470 |
6280 d 12 h |
jermar |
/trunk/ |
Fix a double-free recently introduced in revision r2436.
Add a comment clarifying the life-cycle of the kernel_uarg structure.
Comment out the freeing of userspace thread stack while still running on it.
This should be fixed by implementing userspace version of thread_join(). |
|
/trunk/kernel/generic/src/proc/thread.c /trunk/uspace/libc/generic/thread.c
|
2451 |
6289 d 14 h |
jermar |
/trunk/kernel/generic/ |
JoinMe -> Lingering |
|
/trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/src/proc/scheduler.c /trunk/kernel/generic/src/proc/thread.c
|
2446 |
6292 d 18 h |
jermar |
/trunk/kernel/generic/ |
More efficient and simpler task termination.
Based on the assumption, that after its creation, only the task itself can create more threads for itself,
the last thread with userspace context to execute thread_exit() will perform futex and IPC cleanup. When
the task has no threads, it is destroyed. Both the cleanup and destruction is controlled by reference
counting.
As for userspace threads, even though there could be a global garbage collector for joining threads, it is
much simpler if the uinit thread detaches itself before switching to userspace.
task_kill() is now an idempotent operation. It just instructs the threads within a task to exit.
Change in the name of a thread state: Undead -> JoinMe. |
|
/trunk/kernel/generic/include/adt/list.h /trunk/kernel/generic/include/proc/task.h /trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/src/main/uinit.c /trunk/kernel/generic/src/proc/scheduler.c /trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c
|
2440 |
6293 d 12 h |
jermar |
/trunk/kernel/generic/ |
Fix the problem with sys_thread_create() by splitting the create and attach functionality of
thread_create(). Now it is possible to specify a flag that will cause thread_create() to only allocate and
initialize the thread structure. A call to thread_attach() will make the thread visible to the system.
This arrangement makes it easier to undo creation of a thread in case of a failure in sys_thread_create(). |
|
/trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/src/proc/thread.c
|
2436 |
6294 d 14 h |
jermar |
/trunk/ |
Fix two memory leaks.
In kernel, kernel_uarg structure needs to be deallocated when a thread
with userspace context is destroyed.
In userspace, the return value of the SYS_THREAD_CREATE must be checked
for error conditions and in case of error, uarg and stack must be freed
up. |
|
/trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c /trunk/uspace/libc/generic/thread.c
|
2268 |
6336 d 14 h |
jermar |
/trunk/kernel/generic/ |
Document and assert proper usage of THREAD_FLAG_WIRED.
Original patch by Jan Hudecek. |
|
/trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/src/proc/thread.c
|
2229 |
6345 d 19 h |
jermar |
/trunk/ |
Revert some of the changes introduced in revision 2209.
I think it is not correct to remove serialization of pseudo threads in printf_core.c.
With thread-level futex serialization, several pseudo threads running in one thread could easily deadlock
the task.
Add a dedicated futex serialization to thread1.c test only. |
|
/trunk/kernel/generic/src/proc/thread.c /trunk/uspace/libc/arch/sparc64/src/thread_entry.s /trunk/uspace/libc/generic/io/printf_core.c /trunk/uspace/libc/generic/io/vprintf.c /trunk/uspace/tester/fault/fault1.c /trunk/uspace/tester/fault/fault2.c /trunk/uspace/tester/thread/thread1.c
|
2216 |
6347 d 13 h |
decky |
/trunk/ |
make thread ID 64 bit (task ID is 64 bit already)
cleanup thread syscalls |
|
/trunk/kernel/arch/amd64/include/types.h /trunk/kernel/arch/arm32/include/types.h /trunk/kernel/arch/ia32/include/types.h /trunk/kernel/arch/ia32xen/include/types.h /trunk/kernel/arch/ia64/include/types.h /trunk/kernel/arch/mips32/include/types.h /trunk/kernel/arch/ppc32/include/types.h /trunk/kernel/arch/ppc64/include/types.h /trunk/kernel/arch/sparc64/include/types.h /trunk/kernel/generic/include/interrupt.h /trunk/kernel/generic/include/proc/task.h /trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/src/adt/btree.c /trunk/kernel/generic/src/console/cmd.c /trunk/kernel/generic/src/ipc/ipc.c /trunk/kernel/generic/src/proc/scheduler.c /trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c /trunk/kernel/generic/src/syscall/syscall.c /trunk/kernel/test/fpu/fpu1.c /trunk/kernel/test/fpu/mips2.c /trunk/kernel/test/fpu/sse1.c /trunk/kernel/test/mm/falloc2.c /trunk/kernel/test/mm/slab1.c /trunk/kernel/test/mm/slab2.c /trunk/kernel/test/synch/rwlock3.c /trunk/kernel/test/synch/rwlock4.c /trunk/kernel/test/synch/semaphore2.c /trunk/kernel/test/thread/thread1.c /trunk/uspace/libc/generic/thread.c /trunk/uspace/libc/include/thread.h /trunk/uspace/tester/thread/thread1.c
|
2187 |
6348 d 21 h |
decky |
/trunk/kernel/generic/ |
add syscall for getting current thread ID |
|
/trunk/kernel/generic/include/proc/thread.h /trunk/kernel/generic/include/syscall/syscall.h /trunk/kernel/generic/src/proc/thread.c /trunk/kernel/generic/src/syscall/syscall.c
|
2183 |
6349 d 17 h |
jermar |
/trunk/kernel/generic/ |
Continue to de-oversynchronize the kernel.
- replace as->refcount with an atomic counter; accesses to this
reference counter are not to be done when the as->lock mutex is held;
this gets us rid of mutex_lock_active();
Remove the possibility of a deadlock between TLB shootdown and asidlock.
- get rid of mutex_lock_active() on as->lock
- when locking the asidlock spinlock, always do it conditionally and with
preemption disabled; in the unsuccessful case, enable interrupts and try again
- there should be no deadlock between TLB shootdown and the as->lock mutexes
- PLEASE REVIEW !!!
Add DEADLOCK_PROBE's to places where we have spinlock_trylock() loops. |
|
/trunk/kernel/generic/include/mm/as.h /trunk/kernel/generic/include/synch/mutex.h /trunk/kernel/generic/include/synch/spinlock.h /trunk/kernel/generic/src/ipc/ipc.c /trunk/kernel/generic/src/ipc/irq.c /trunk/kernel/generic/src/mm/as.c /trunk/kernel/generic/src/proc/scheduler.c /trunk/kernel/generic/src/proc/task.c /trunk/kernel/generic/src/proc/thread.c /trunk/kernel/generic/src/synch/spinlock.c /trunk/kernel/generic/src/synch/waitq.c /trunk/kernel/generic/src/time/timeout.c
|