Now uses waitpid() instead of wait_for_thread() - and surprise, it doesn't
work yet :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9372 a95241bf-73f2-0310-859d-f6bbb57e9c96
no longer pop %fs from the iframe in that case, too.
When we restore a custom stack, however, we'll now pop %fs from the iframe
as such strange threads may even do their own business with it.
Added some comments.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9369 a95241bf-73f2-0310-859d-f6bbb57e9c96
We also should disable interrupts in arch_restore_fork_frame().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9368 a95241bf-73f2-0310-859d-f6bbb57e9c96
always copies the arguments and environment arrays.
No need for the "owns_arrays" in team_arg anymore - it now always owns
them.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9363 a95241bf-73f2-0310-859d-f6bbb57e9c96
Switched to load_image() instad of using the old team_create_team() to start "init".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9361 a95241bf-73f2-0310-859d-f6bbb57e9c96
The path name is now always taken from the provided argument list (except for
_user_exec() which now replaces args[0] with the path argument).
The team_arg structure know nows if it must delete its arguments or not - this
also fixes a memory leak in case team_create_team() failed when invoked from
userland.
load_image() is now also exported for the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9360 a95241bf-73f2-0310-859d-f6bbb57e9c96
Enhanced exec_test.c to use some process functions as well.
Switched to load_image() instead of using the old _kern_create_team() syscall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9359 a95241bf-73f2-0310-859d-f6bbb57e9c96
process ID (in the current session).
get_death_entry() could call free() with interrupts disabled; now follows
the same mechanism as chosen with the groups (ie. it returns a pointer
to a death_entry to be freed by the calling function).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9354 a95241bf-73f2-0310-859d-f6bbb57e9c96
the specified process group (by passing in a negative pid, as in BeOS).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9351 a95241bf-73f2-0310-859d-f6bbb57e9c96
- we now have a working process group/session model. Implemented related syscalls
and the kernel backend, some POSIX process functions are now available in the
kernel as well.
- dying teams now monitor their exitus by leaving death_entry structures in
their parent team.
- Implemented wait_for_child() for pid == -1 and pid > 0; IOW waiting for process
groups is missing yet. Hasn't yet been tested intensively.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9350 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed team_remove_team() to support process groups.
Added new prototype for team_delete_process_group().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9347 a95241bf-73f2-0310-859d-f6bbb57e9c96
to the team structure to support these concepts.
Moved the dead_children stuff into a sub-structure.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9346 a95241bf-73f2-0310-859d-f6bbb57e9c96
API modifications for ServerApp to support PortLink messages sent via an area
Added a RAM-based PortLink message reader to handle reading from an area
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9336 a95241bf-73f2-0310-859d-f6bbb57e9c96
may be renamed):
- B_RELEASE_ALL: the semaphore count is set to 0, all waiting threads are released
(the "count" argument of release_etc_sem() is ignored then)
- B_RELEASE_IF_WAITING_ONLY: the semaphore count is only decreased if there
are any waiting threads; ie. the semaphore is signaled
Together, they will make the pthread_cond_*() functions easy to implement, and
they come in handy at other places, too.
Removed release_threads variable in release_sem_etc(), as it was useless.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9330 a95241bf-73f2-0310-859d-f6bbb57e9c96
may be renamed):
- B_RELEASE_ALL: the semaphore count is set to 0, all waiting threads are released
(the "count" argument of release_etc_sem() is ignored then)
- B_RELEASE_IF_WAITING_ONLY: the semaphore count is only decreased if there
are any waiting threads; ie. the semaphore is signaled
Together, they will make the pthread_cond_*() functions easy to implement, and
they come in handy at other places, too.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9329 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also removed syscall for that function (shouldn't have been there in the
first place, anyway).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9325 a95241bf-73f2-0310-859d-f6bbb57e9c96