summaryrefslogtreecommitdiff
path: root/viengoos/object.c
AgeCommit message (Collapse)Author
2008-05-282008-05-28 Neal H. Walfield <neal@gnu.org>neal
* object.c (object_find_soft): Also claim the object if ODESC->EVICTION_CANDIDATE is true.
2008-05-282008-05-28 Neal H. Walfield <neal@gnu.org>neal
* object.c (folio_object_alloc): Set CAP's policy to POLICY.
2008-05-28libc-parts/neal
2008-05-28 Neal H. Walfield <neal@gnu.org> * process-spawn.c (process_spawn): Update use of folio_object_alloc to be consistent with new API. viengoos/ 2008-05-28 Neal H. Walfield <neal@gnu.org> * object.h (folio_object_alloc): Return a struct cap, not void. Remove the objectp parameter. Update all users. * object.c (folio_object_alloc): Return a capability designating the new object. Don't take a location in which to store the new object.
2008-05-242008-05-24 Neal H. Walfield <neal@gnu.org>neal
* object.c (object_desc_claim): Fix debug statement, ACTIVITY may be NULL.
2008-05-232008-05-23 Neal H. Walfield <neal@gnu.org>neal
* object.h (object_desc_flush): Take additional parameter, clear_kernel. If true, fetch the status bits corresponding to Viengoos even if the dirty bit is set. Update callers. * pager.c (is_clean): More thoroughly check that a page alleged to be clean is really all zeros.
2008-05-23hurd/neal
2008-05-23 Neal H. Walfield <neal@gnu.org> * cap.h (RM_object_status): Define. (object_dirty): Likewise. (object_referenced): Likewise. (object_status): New method. * folio.h (struct folio): Add fields dirty and referenced. (folio_object_referenced): New function. (folio_object_referenced_set): Likewise. (folio_object_dirty): Likewise. (folio_object_dirty_set): Likewise. viengoos/ 2008-05-23 Neal H. Walfield <neal@gnu.org> * rm.h (rm_method_id_string): Handle the case where ID is RM_object_status. * server.c (server_loop): Implement the object_status method. * ager.c (ager_loop): Set DESC->USER_DIRTY and DESC->REFERENCED as appropriate. * object.c (folio_object_alloc): Clear ODESC->USER_REFERENCED and ODESC->USER_DIRTY. (folio_object_alloc): Clear the object's user referenced and user dirty bits. * object.h (struct object_desc): Add fields user_dirty and user_referenced. (object_desc_unmap): Update DESC->USER_DIRTY and DESC->USER_REFERENCED appropriately. (object_desc_flush): LIkewise.
2008-05-232008-05-23 Neal H. Walfield <neal@gnu.org>neal
* object.c (memory_object_alloc): Clear OBJECT's status bits before returning it.
2008-05-232008-05-23 Neal H. Walfield <neal@gnu.org>neal
* object.c (object_find_soft): If we don't claim ODESC, mark it as shared.
2008-05-212008-05-21 Neal H. Walfield <neal@gnu.org>neal
* object.c (folio_object_alloc): Use the strong variant of TYPE.
2008-02-202008-02-20 Neal H. Walfield <neal@gnu.org>neal
* activity.h (struct activity): Unify the inactive_dirty and inactive_clean lists. Update users.
2008-02-202008-02-20 Neal H. Walfield <neal@gnu.org>neal
* object.c (FOLIOS_CORE): Increase value.
2008-02-18hurd/neal
2008-02-18 Neal H. Walfield <neal@gnu.org> * exceptions.h: Include <stdint.h>. (struct exception_info): Add field discarded. viengoos/ 2008-02-18 Neal H. Walfield <neal@gnu.org> * server.c (server_loop): When resolving a fault, if the page was discarded, reflect the fault. * object.c (object_find): If the page was discarded, return NULL. (folio_object_alloc): Clear the discarded flag. * object.c (memory_object_destroy): Don't set the discarded flag or content flag here. * memory.c (memory_frame_allocate): Set them here.
2008-02-162008-02-16 Neal H. Walfield <neal@gnu.org>neal
* object.h (struct object_desc): Add fields mapped, shared and floating. (object_desc_unmap): Only unmap a page if DESC->MAPPED is true. (object_desc_flush): Call object_desc_unmap rather than copying the code. * object.c (object_find_soft): If ODESC->FLOATING is true, claim the object. Set ODESC->FLOATING to false. (folio_object_alloc): After clearing the page, flush it and then ODESC->DIRTY to false. Set ODESC->SHARED to false. * ager.c (SAMPLES): Rename from this... (FREQ): ... to this. Update users. (ager_loop): Don't just flush the whole address space; every FREQ iterations, unmap shared objects, set DESC->MAPPED to false, and DESC->FLOATING to true. * server.c (server_loop): When mapping a page, record it.
2008-02-16viengoos/neal
2008-02-16 Neal H. Walfield <neal@gnu.org> * object.h (kernel_lock): New declaration. Replace current locking scheme with this global lock variable. (lru_lock): Remove variable. (struct object_desc): Remove field lock. * object.c (kernel_lock): New variable. libc-parts/ 2008-02-16 Neal H. Walfield <neal@gnu.org> * process-spawn.c (process_spawn) [RM_INTERN]: Don't take LRU_LOCK.
2008-02-152008-02-15 Neal H. Walfield <neal@gnu.org>neal
* object.c (memory_object_destroy): Set discardable bit if appropriate.
2008-02-152008-02-15 Neal H. Walfield <neal@gnu.org>neal
* object.c (memory_object_destroy): Move lru_lock unlock later.
2008-02-152008-02-15 Neal H. Walfield <neal@gnu.org>neal
* object.h (struct object_desc): Change live from bit field to a bool. * object.c: Include <assert.h>. (memory_object_destroy): Add asserts. Fix canary being careful not to overwrite DESC->LIVE. (object_find_soft): Add assert. (folio_object_alloc): Likewise.
2008-02-112008-02-11 Neal H. Walfield <neal@gnu.org>neal
* object.c (folio_object_alloc): When reallocating an object and the object is in memory, clear the memory.
2008-02-082008-02-08 Neal H. Walfield <neal@gnu.org>neal
* object.h (memory_object_destroy): Update comment to indicate that LRU_LOCK must not be held by the caller. (object_desc_claim): Update comment to indicate that LRU_LOCK must be held by the caller. * object.c (memory_object_destroy): Don't assert that LRU_LOCK is held. Take the lock before calling object_desc_claim. (object_desc_claim): Assert that LRU_LOCK is held. * viengoos.c (system_task_load): Take LRU_LOCK before calling object_claim. * memory.c (memory_frame_allocate): After getting an object, lock it and then drop LRU_LOCK.
2008-02-08libhurd-ihash/neal
2008-02-08 Neal H. Walfield <neal@gnu.org> * ihash.h: Include <bits/wordsize.h>. (hurd_ihash_key64_t): New definition. (struct _hurd_ihash_item64): New structure. (struct hurd_ihash): Change items's type void *. [__WORDSIZE == 32]: Add field large. (_HURD_IHASH_LARGE): New macro. (HURD_IHASH_INITIALIZER): Take additional argument large. Use it. (hurd_ihash_init): Take additional argument large. (hurd_ihash_buffer_size): Likewise. (hurd_ihash_init_with_buffer): Likewise. (hurd_ihash_create): Likewise. (hurd_ihash_replace): Change key's type to hurd_ihash_key64_t. (hurd_ihash_add): Likewise. (hurd_ihash_find): Likewise. (hurd_ihash_remove): Likewise. (HURD_IHASH_ITERATE): Rewrite to properly handle both 32- and 64-bit keys. * ihash.c (ITEM): New macro. (VALUE): Likewise. (KEY): Likewise. (ITEM_SIZE): Likewise. (index_empty): Use the above macros rather than accessing HT->ITEMS directly. (index_valid): Likewise and change key's type to a hurd_ihash_key64_t. (find_index): Likewise. (replace_one): Likewise. (hurd_ihash_replace): Likewise. (hurd_ihash_find): Likewise. (hurd_ihash_remove): Likewise. (hurd_ihash_init_internal): Take additional argument large. Use it. (hurd_ihash_init): Likewise. (hurd_ihash_init_with_buffer): Likewise. (hurd_ihash_create): Likewise. (hurd_ihash_buffer_size): Likewise. * t-ihash.c: Include <assert.h>. (main): Expect that TEST_LARGE is defined. Use it when calling hurd_ihash_init. If true, add some tests with 64-bit keys. * Makefile.am (TESTS): Add t-ihash64. (check_PROGRAMS): Likewise. (t_ihash_CPPFLAGS): Add -DTEST_LARGE=false. (t_ihash64_SOURCES): New variable. (t_ihash64_CPPFLAGS): Likewise. viengoos/ 2008-02-08 Neal H. Walfield <neal@gnu.org> * thread.c (thread_init): Update use of hurd_ihash_init_with_buffer to be consistent with new API. * object.c (object_init): Likewise. libpthread/ 2008-02-08 Neal H. Walfield <neal@gnu.org> * sysdeps/hurd/pt-setspecific.c (pthread_setspecific): Update use of hurd_ihash_create to be consistent with API changes.
2008-02-08libhurd-ihash/neal
2008-02-08 Neal H. Walfield <neal@gnu.org> * ihash.h: Include <bits/wordsize.h>. (hurd_ihash_key64_t): New definition. (struct _hurd_ihash_item64): New structure. (struct hurd_ihash): Change items's type void *. [__WORDSIZE == 32]: Add field large. (_HURD_IHASH_LARGE): New macro. (HURD_IHASH_INITIALIZER): Take additional argument large. Use it. (hurd_ihash_init): Take additional argument large. (hurd_ihash_buffer_size): Likewise. (hurd_ihash_init_with_buffer): Likewise. (hurd_ihash_create): Likewise. (hurd_ihash_replace): Change key's type to hurd_ihash_key64_t. (hurd_ihash_add): Likewise. (hurd_ihash_find): Likewise. (hurd_ihash_remove): Likewise. (HURD_IHASH_ITERATE): Rewrite to properly handle both 32- and 64-bit keys. * ihash.c (ITEM): New macro. (VALUE): Likewise. (KEY): Likewise. (ITEM_SIZE): Likewise. (index_empty): Use the above macros rather than accessing HT->ITEMS directly. (index_valid): Likewise and change key's type to a hurd_ihash_key64_t. (find_index): Likewise. (replace_one): Likewise. (hurd_ihash_replace): Likewise. (hurd_ihash_find): Likewise. (hurd_ihash_remove): Likewise. (hurd_ihash_init_internal): Take additional argument large. Use it. (hurd_ihash_init): Likewise. (hurd_ihash_init_with_buffer): Likewise. (hurd_ihash_create): Likewise. (hurd_ihash_buffer_size): Likewise. * t-ihash.c: Include <assert.h>. (main): Expect that TEST_LARGE is defined. Use it when calling hurd_ihash_init. If true, add some tests with 64-bit keys. * Makefile.am (TESTS): Add t-ihash64. (check_PROGRAMS): Likewise. (t_ihash_CPPFLAGS): Add -DTEST_LARGE=false. (t_ihash64_SOURCES): New variable. (t_ihash64_CPPFLAGS): Likewise. viengoos/ 2008-02-08 Neal H. Walfield <neal@gnu.org> * thread.c (thread_init): Update use of hurd_ihash_init_with_buffer to be consistent with new API. * object.c (object_init): Likewise. libpthread/ 2008-02-08 Neal H. Walfield <neal@gnu.org> * sysdeps/hurd/pt-setspecific.c (pthread_setspecific): Update use of hurd_ihash_create to be consistent with API changes.
2008-02-062008-02-06 Neal H. Walfield <neal@gnu.org>neal
* object.c (folio_free): Synchronize the in-memory descriptor with the on-disk data. (folio_object_alloc): Likewise.
2008-02-05hurd/neal
2008-02-05 Neal H. Walfield <neal@gnu.org> * folio.h (struct folio) [RM_INTERN]: Remove field dhazard, mhazard. Add field checksums. Rearrange data structure. (folio_object_type): New function. (folio_object_type_set): Likewise. (folio_object_policy): Likewise. (folio_object_policy_set): Likewise. [RM_INTERN]: Include <bit-array.h>. (folio_object_wait_queue_p) [RM_INTERN]:New function. (folio_object_wait_queue_p_set) [RM_INTERN]:Likewise. (folio_object_wait_queue) [RM_INTERN]:Likewise. (folio_object_wait_queue_set) [RM_INTERN]:Likewise. (folio_object_version) [RM_INTERN]:Likewise. (folio_object_version_set) [RM_INTERN]:Likewise. (folio_object_content) [RM_INTERN]:Likewise. (folio_object_content_set) [RM_INTERN]:Likewise. viengoos/ 2008-02-05 Neal H. Walfield <neal@gnu.org> * thread.h (struct wait_queue_node): Remove structure. (struct thread): Add field wait_queue_p. Make the wait queue next and previous pointers oid_t's and not struct cap's. Update users. * object.h (object_oid): New function. * as.c (as_build_internal): Don't access a folio's fields directly; use the accessor functions. * cap.c (cap_shootdown): Likewise. * cap-lookup.c (lookup): Likewise. * object.c (memory_object_destroy): Likewise. (object_find): Likewise. (folio_free): Likewise. (folio_object_alloc): Likewise. (object_wait_queue): Remove function. (object_wait_queue_head): Don't access a folio's fields directly; use the accessor functions. Update implementation to reflect struct thread changes. (object_wait_queue_tail): Likewise. (object_wait_queue_next): Likewise. (object_wait_queue_prev): Likewise. (object_wait_queue_check): Likewise. (object_wait_queue_enqueue): Likewise. (object_wait_queue_dequeue): Likewise. * object.h (folio_object_wait_queue_for_each): Likewise.
2008-01-23libhurd-ihash/neal
2008-01-23 Neal H. Walfield <neal@gnu.org> * ihash.h (hurd_ihash_buffer_size): New declaration. (hurd_ihash_init_with_buffer): Likewise. (hurd_ihash_init): Add comment that this function is not provided if the library is compiled with NO_MALLOC. (hurd_ihash_create): Likewise. (hurd_ihash_free): Likewise. (hurd_ihash_destroy): Update comment. * ihash.c (hurd_ihash_init_with_buffer): New function. (hurd_ihash_destroy) [NO_MALLOC]: Don't free HT->ITEMS. (hurd_ihash_create) [NO_MALLOC]: Just return ENOMEM; (hurd_ihash_free) [NO_MALLOC]: Remove function. (hurd_ihash_buffer_size): New function. (hurd_ihash_replace) [NO_MALLOC]: Don't attempt to expand the hash table. [! NO_MALLOC]: Use hurd_ihash_buffer_size to calculate an appropriate buffer size. * Makefile.am (lib_LIBRARIES): Add libhurd-ihash-nomalloc.a. (libhurd_ihash_nomalloc_a_CPPFLAGS): New variable. (libhurd_ihash_nomalloc_a_SOURCES): Likewise. * t-ihash.c (main): Cast locp offset calculation to elide warning. viengoos/ 2008-01-23 Neal H. Walfield <neal@gnu.org> * thread.c: Include "zalloc.h". (thread_init): Initialize TID_TO_THREAD hash here. Allocate using zalloc. * object.c: Include "zalloc.h". (object_init): Allocate hash table and object_descs using zalloc. * Makefile.am (viengoos_SOURCES): Remove malloc.h and malloc-wrap.c. (viengoos_LDADD): Use ../libhurd-ihash/libhurd-ihash-nomalloc.a rather than ../libhurd-ihash/libhurd-ihash.a. (EXTRA_viengoos_SOURCES): Remove variable. * memory.c (memory_grab) [_L4_TEST_ENVIRONMENT]: Don't include binary when calculating available memory.
2008-01-162008-01-17 Neal H. Walfield <neal@gnu.org>neal
* object.c (folio_object_alloc): If a thread is waiting for an event other than THREAD_WAIT_DESTROY, return EFAULT.
2008-01-16hurd/neal
2008-01-16 Neal H. Walfield <neal@gnu.org> * thread.h (RM_thread_wait_object_destroyed): New define. (thread_wait_object_destroyed): New method. * folio.h (folio_object_alloc): Take additional parameter return_code. viengoos/ 2008-01-16 Neal H. Walfield <neal@gnu.org> * thread.h (THREAD_WAIT_FUTEX): New define. (THREAD_WAIT_DESTROY): Likewise. (struct thread): Remove fields futex_block and futex_offset. Add fields wait_reason and wait_reason_arg. Update users. * object.h (folio_object_alloc): Take additional argument return_code. Update users. (folio_object_wait_queue_for_each): New macro. * object.c: Include <hurd/thread.h>. (folio_object_alloc): Take additional argument return_code. Wake any threads blocked on the object being destroyed. * server.c (server_loop): Update folio_object_alloc method implementation to new API. Pass RETURN_CODE to the call to folio_object_alloc. Implement the thread_wait_object_destroyed method. * t-activity.c (allocate_object): Update rm_folio_object_alloc use to reflect API changes. (test): Likewise. * t-as.c (allocate_object): Likewise. libhurd-mm/ 2008-01-16 Neal H. Walfield <neal@gnu.org> * storage.c (shadow_setup): Update rm_folio_object_alloc use to reflect API changes. (storage_alloc_): Likewise. (storage_free_): Likewise. ruth/ 2008-01-16 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Update rm_folio_object_alloc use to reflect API changes. Add test case for thread_wait_object_destroy.
2008-01-15hurd/neal
2008-01-15 Neal H. Walfield <neal@gnu.org> * futex.h (futex_wait): New file. * Makefile.am (includehurd_HEADERS): Add futex.h. * headers.m4: Link $(BUILDIR)/include/hurd/futex.h to futex.h. * RPC: Add futex message id assignment. * folio.h (struct folio): Add field wait_queue. Remove field checksum (for now). viengoos/ 2008-01-15 Neal H. Walfield <neal@gnu.org> * object.h (struct thread): New forward. (object_wait_queue_head): New declaration. (object_wait_queue_tail): New declaration. (object_wait_queue_next): New declaration. (object_wait_queue_prev): New declaration. (object_wait_queue_enqueue): New declaration. (object_wait_queue_dequeue): New declaration. (object_wait_queue_for_each): New macro. * object.c (object_wait_queue): New function. (object_wait_queue_head): Likewise. (object_wait_queue_tail): Likewise. (object_wait_queue_next): Likewise. (object_wait_queue_prev): Likewise. (object_wait_queue_check): Likewise. (object_wait_queue_enqueue): Likewise. (object_wait_queue_dequeue): Likewise. * thread.h (struct wait_queue_node): New structure. (struct thread): Add fields wait_queue_head, wait_queue_tail, futex_block, futex_offset and wait_queue. * thread.c (thread_deinit): If THREAD is enqueue on a wait queue, dequeue it. * rm.h: Include <hurd/futex.h>. (rm_method_id_string): Handle the RM_futex case. * server.c: Include <hurd/futex.h>. (server_loop): Implement the rm_futex method. ruth/ 2008-01-15 Neal H. Walfield <neal@gnu.org> * ruth.c: Include <hurd/futex.h>. (main) Test futex implementation.
2008-01-062008-01-06 Neal H. Walfield <neal@gnu.org>neal
* object.h (object_age): Add parameter referenced. Update users. Use text-book aging algorithm. * ager.c (ager_loop): Use object_age to age objects. * object.h (object_active): New function. * object.c (object_find_soft): Use it to check whether an object is active. (object_desc_claim): Likewise. * ager.c (ager_loop): Likewise.
2008-01-042008-01-04 Neal H. Walfield <neal@gnu.org>neal
* activity.h (struct activity): Add fields eviction_clean and eviction_dirty. Improve comments. (activity_charge): Change asserts to account for unsignedness. * activity.c (activity_destroy): Move all objects owned by VICTIM to its parent. (activity_deprepare): Add additional asserts. (do_activity_dump): Don't assert that ACTIVITY->FRAMES_LOCAL is the sum of the items on ACTIVITY's LRU lists. * object.h (struct object_desc): Add fields eviction_candidate, live, laundry_node and available_node. Make priority_node a union with activity_node, which replaces activity_lru. Remove field global_lru. (object_activity_lru): Rename this list class... (activity_lru): ... to this. Update users. (object_global_lru): Don't generate this list class. (eviction): Generate new list class. (available): Likewise. (laundry): Likewise. (global_active): Remove declaration. (global_inactive_dirty): Likewise. (global_inactive_clean): Likewise. (disowned): Likewise. (laundry): New declaration. (available): Likewise. (memory_object_destroy): Likewise. (object_desc_disown_simple): Remove declaration. (object_disown_simple): Remove function. (object_desc_disown): Likewise. (object_disown): Likewise. (object_desc_claim): Take additional parameter update_accounting. Update users. (object_claim): Likewise. (object_desc_unmap): New function. (object_age): Likewise. (objects_folio_offset): Likewise. (objects_folio): Likewise. (object_free): Implement in terms of the above two functions. * object.c (global_active): Remove variable. (global_inactive_dirty): Likewise. (global_inactive_clean): Likewise. (disowned): Likewise. (laundry): New variable. (available): Likewise. (memory_object_alloc): Initialize ODESC to 0. Call object_desc_claim to attach it to the relevant lists. Assert that ODESC->LIVE is 0. Set ODESC->LIVE to 1. (memory_object_destroy): Remove static qualifier. Require that LRU_LOCK be held on entry. Update users. Use object_desc_claim to disconnect DESC from any lists to which it is attached. Don't call memory_frame_free, that is now the caller's responsibility. Update users. Set DESC->LIVE to 0. (folio_free): Don't disown the folio header. (folio_object_alloc): Call memory_frame_free to really free the memory. (object_desc_disown_simple): Remove function. (object_desc_disown_): Likewise. (object_desc_claim): Take additional parameter update_accounting. If true, update the relevant activities' accounting information. Update connect and disconnect code. Only add an object to one of the priority tree and the lru lists, but not both. * viengoos.c (system_task_load): After allocating the root activity, have the root activity claim it and FOLIO. * ager.c: Include "zalloc.h". (AGE_DELTA): Don't define. (ager_loop): Rewrite to walk the object descriptors sequentially rather than following a linked list. Update object list connection and disconnection code. * pager.h: New file. * pager.c: Likewise. * Makefile.am (viengoos_SOURCES): Add pager.h and pager.c. * memory.h (struct activity): Add forward. (memory_frame_allocate): Take additional parameter activity. Return a uintptr_t instead of an l4_word_t. Update users. * memory.c: Include "pager.h" and "activity.h". (memory_grab): Always get base page sized pages. (memory_frame_allocate): Take additional parameter activity. Return a uintptr_t instead of an l4_word_t. If zalloc fails, check AVAILABLE_LIST. If nothing is applicable, call pager_collect and try again. * t-environment.h (pager_collect): New function.
2008-01-032008-01-03 Neal H. Walfield <neal@gnu.org>neal
* object.c (folio_alloc): Correctly account folios.
2008-01-012008-01-01 Neal H. Walfield <neal@gnu.org>neal
* object.c (memory_object_destroy): Unlock LRU_LOCK.
2008-01-01libhurd-mm/neal
2008-01-01 Neal H. Walfield <neal@gnu.org> * activity.h (RM_activity_properties): Rename... (RM_activity_policy): ... to this. Update users. (struct activity_memory_policy): New structure. (ACTIVITY_MEMORY_POLICY): New definition. (ACTIVITY_MEMORY_POLICY_VOID): Likewise. (struct activity_policy): New structure. (ACTIVITY_POLICY): New definition. (ACTIVITY_POLICY_VOID): Likewise. (ACTIVITY_PROPERTIES_PRIORITY_SET): Rename... (ACTIVITY_POLICY_SIBLING_REL_PRIORITY_SET): ... to this. Update users. (ACTIVITY_PROPERTIES_WEIGHT_SET): Rename... (ACTIVITY_POLICY_SIBLING_REL_WEIGHT_SET): ... to this. Update users. (ACTIVITY_PROPERTIES_STORAGE_QUOTA_SET): Rename... (ACTIVITY_POLICY_STORAGE_SET): ... to this. Update users. (ACTIVITY_PROPERTIES_ALL_SET): Rename... (ACTIVITY_POLICY_SIBLING_REL_SET): ... to this. (ACTIVITY_POLICY_CHILD_REL_PRIORITY_SET): New definition. (ACTIVITY_POLICY_CHILD_REL_WEIGHT_SET): Likewise. (ACTIVITY_POLICY_CHILD_REL_SET): Likewise. (activity_properties): Rename... (activity_policy): ... to this. Accept a structure rather than individual variables. Update callers. viengoos/ 2008-01-01 Neal H. Walfield <neal@gnu.org> * activity.h: Don't include <l4.h>, <errno.h> or <hurd/btree.h>. Include <hurd/activity.h>. (struct activity): Remove fields priority, weight and storage_quota. Replace with policy. Change folio_count to a uint32_t. Update users. * server.c (server_loop): Remove activity_properties implementation. Add activity_policy implementation. * rm.h (rm_method_id_string): Remove RM_activity_properties case. Handle RM_activity_policy. ruth/ 2008-01-01 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Remove activity_properties test. Replace with activity_policy test.
2008-01-012008-01-01 Neal H. Walfield <neal@gnu.org>neal
* activity.h (struct activity): Rename field parent to parent_cap. Rename field children to children_cap. Rename field sibling_next to sibling_next_cap. Rename field sibling_prev to sibling_prev_cap. Rename field parent_ptr to parent. Add fields children, sibling_next and sibling_prev. Rename field frames to frames_total. Add field frames_local. Update users. (activity_prepare): New declaration. (activity_deprepare): Likewise. (activity_charge): Update ACTIVITY->FRAMES_LOCAL. (activity_for_each_inmemory_child): New define. * activity.c (activity_create): Call activity_prepare. (activity_destroy): Assert that VICTIM->FRAMES_LOCAL is 0. Call activity_deprepare. (activity_prepare): New function. (activity_deprepare): Likewise. (do_activity_dump): Assert that the total number of objects on the active, dirty and clean lists matches ACTIVITY->FRAMES_LOCAL.
2007-12-312007-12-31 Neal H. Walfield <neal@gnu.org>neal
* list.h: New file. * Makefile.am (viengoos_SOURCES): Add list.h. (t_link_SOURCES): Remove object.h. Add list.h. * object.h: Include "list.h". (LINK_TEMPLATE): Move from here... * list.h: ... to this new file. Generalize functionality. Add count, head, prev, next and prev methods. Rename LINK_TEMPLATE to LIST_CLASS. Update users. * object.h (struct object_desc): Change activity_lru and global_lru to struct list_node's. (global_active): Change to a struct object_global_lru_list. (global_inactive_dirty): Likewise. (global_inactive_clean): Likewise. (disowned): Change to a struct object_activity_lru_list. * object.c (global_active): Change to a struct object_global_lru_list. (global_inactive_dirty): Likewise. (global_inactive_clean): Likewise. (disowned): Change to a struct object_activity_lru_list. * activity.h (struct activity): Change active, inactive_clean and inactive_dirty to struct object_activity_lru_list's.
2007-12-262007-12-26 Neal H. Walfield <neal@gnu.org>neal
* activity.h (activity_for_each_child): Improve comment. (activity_consistency_check): Remove. (activity_consistency_check_): Likewise. * activity.c (activity_consistency_check_): Remove. * object.c (memory_object_alloc): Remove call to activity_consistency_check. (object_find_soft): Likewise. (folio_free): Likewise. (folio_object_alloc): Likewise.
2007-12-262007-12-26 Neal H. Walfield <neal@gnu.org>neal
* object.h (struct object_desc): Replace field activity_lru.prevp with activity_lru.prev. Replace field global_lru.prevp with global_lru.prev. (LINK_TEMPLATE): Use circular lists. Replace the object_field_link function with object_field_push and object_field_queue. Require that the caller pass the head of the list to unlink. Update users.
2007-12-262007-12-26 Neal H. Walfield <neal@gnu.org>neal
* object.h: Include <hurd/btree.h>. Don't include "activity.h". (struct activity): Add forward. (struct object_desc): Add field priority_node. (priority_compare): New function. (priorities): New btree class. * activity.h: Include <hurd/btree.h>. Don't include "object.h". (struct activity): Add field priorities. * ager.c (ager_loop): Don't add discardable dirty objects to the inactive dirty list. * object.h (object_find): Take additional parameter policy. Update callers. (object_find_soft): Likewise. (object_desc_disown_simple): Move implementation from here... * object.c (object_desc_disown_simple): ... to here. Maintain the activity's priority-ordered object list. * object.h (object_desc_disown_): Move from here... * object.c (object_desc_disown_): ... to here. Maintain the activity's priority-ordered object list. * object.h (object_desc_claim_): Move from here... * object.c (object_desc_claim_): ... to here. Take additional parameter policy. Save the policy in the object descriptor. Maintain the activity's priority-ordered object list. Update callers. * object.h (object_claim_): Take additional parameter policy. Pass it to object_desc_claim_. Update callers. * object.c (memory_object_alloc): Take additional parameter policy. Pass it to object_desc_claim. Update callers. (object_find_soft): Likewise. (object_find): Likewise.
2007-12-25hurd/neal
2007-12-25 Neal H. Walfield <neal@gnu.org> * cap.h: Include <stdint.h>. (OBJECT_PRIORITY_BITS): Define. (OBJECT_PRIORITY_MAX): Likewise. (OBJECT_PRIORITY_LRU): Likewise. (OBJECT_PRIORITY_MIN): Likewise. (struct object_policy): New structure. (OBJECT_POLICY_INIT): Define. (OBJECT_POLICY): Likewise. (OBJECT_POLICY_VOID): Likewise. (OBJECT_POLICY_DEFAULT): Likewise. (struct cap_properties): New structure. (CAP_PROPERTIES_INIT): Define. (CAP_PROPERTIES): Likewise. (CAP_PROPERTIES_VOID): Likewise. (CAP_PROPERTIES_DEFAULT): Likewise. (struct cap): Add fields discardable and priority. [RM_INTERN]: Reduce OID to 54 bits. [! RM_INTERN]: Allow the shadow field an entire word. (CAP_PROPERTIES_GET): Define. (CAP_PROPERTIES_SET): Likewise. (CAP_COPY_DISCARDABLE_SET): Likewise. (CAP_COPY_PRIORITY_SET): Likewise. (cap_copy): Remove the stuct cap_addr_trans parameter and replace with a struct cap_properties. Update callers. (cap_read): Likewise. (object_slot_copy_out): Likewise. (object_slot_copy_in): Likewise. (object_slot_read): Likewise. (cap_copy_x): Likewise. Save the object policies in the shadow capability. (cap_get_shadow): Don't munge the address. (cap_set_shadow): Likewise. * thread.h: Include <hurd/cap.h>. (struct hurd_thread_exregs_in): Remove field aspace_addr_trans. Add field aspace_cap_properties. Rename field aspace_addr_trans_flags to aspace_cap_properties_flags. * folio.h (struct folio): Remove field discardable. Add field policy. (folio_object_alloc): Take an additional argument, a struct object_policy. Update users. * cap.h (cap_is_a): Remove dead code. (cap_is_a_page): Remove dead code. libhurd-mm/ 2007-12-25 Neal H. Walfield <neal@gnu.org> * as.h: Change VISIT's signature: pass a struct cap_properties instead of a struct cap_addr_trans. Update callers. * as.c (as_walk): Change VISIT's signature: pass a struct cap_properties instead of a struct cap_addr_trans. Call VISIT appropriately. (as_alloc_slow): Update rm_cap_read use to reflect API changes. (as_init): Update rm_cap_read use to reflect API changes. Use CAP_PROPERTIES_SET to set shadow capability properties. * storage.c (shadow_setup): Update rm_folio_object_alloc use to reflect API changes. Also save the object policy in the shadow capability. (storage_alloc_): Likewise. (storage_free_): Likewise. viengoos/ 2007-12-25 Neal H. Walfield <neal@gnu.org> * object.h (struct object_desc): Add field policy. (object_desc_to_cap): Also return the discardable bit and the priority. (folio_object_alloc): Take additional parameter, the object's policy. Update callers. * object.c (folio_object_alloc): Take additional parameter, the object policy. Save it in the folio header. * as.c (as_build_internal): Update cap_copy_x use to reflect API changes. * thread.h: Remove parameter addr_trans and replace with a parameter that includes it and the object policy. Update users. * thread.c (thread_exregs): Remove parameter addr_trans and replace with a parameter that includes it and the object policy. Pass it to cap_copy_x as appropriate. * server.c: Include "output.h". (server_loop): Update the folio_object_alloc, object_slot_copy_out, object_slot_copy_in, and cap_copy implementations to set the allocated object's policy consistent with the API changes. Update the object_slot_read and cap_read implementations to return the object policy consistent with the API changes. Update the thread_exregs implementation to handle the address space capability's object policy consistent with the API changes. ruth/ 2007-12-25 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Change visit to be consistent with as_walk's expected function signature. Update rm_folio_object_alloc use to reflect API changes.
2007-12-22hurd/neal
2007-12-22 Neal H. Walfield <neal@gnu.org> * folio.h (FOLIO_PRIORITY_BITS): Define. (FOLIO_PRIORITY_MIN): Likewise. (FOLIO_PRIORITY_LRU): Likewise. (FOLIO_PRIORITY_MAX): Likewise. (FOLIO_GROUP_BITS): Likewise. (FOLIO_GROUP_NONE): Likewise. (FOLIO_GROUP_MIN): Likewise. (FOLIO_GROUP_MAX): Likewise. (struct folio_policy): New structure. (FOLIO_POLICY_INIT): Define. (FOLIO_POLICY_VOID): Likewise. (FOLIO_POLICY_DEFAULT): Likewise. (struct folio): Add field policy. (RM_folio_policy): Define. (folio_alloc): Take additional parameter policy. (FOLIO_POLICY_DELIVER): Define. (FOLIO_POLICY_DISCARDABLE_SET): Likewise. (FOLIO_POLICY_GROUP_SET): Likewise. (FOLIO_POLICY_PRIORITY_SET): Likewise. (FOLIO_POLICY_SET): Likewise. (folio_policy): New method. viengoos/ 2007-12-22 Neal H. Walfield <neal@gnu.org> * object.h (folio_alloc): Take additional parameter policy. Update users. (folio_policy): New declaration. * object.c: Include <hurd/folio.h>. (folio_alloc): Take additional parameter policy. Use it. (folio_policy): New function. * server.c (server_loop): Update folio_alloc implementation to handle additional parameter policy. Implement the folio_policy method. libhurd-mm/ 2007-12-22 Neal H. Walfield <neal@gnu.org> * storage.c (storage_alloc_): Update rm_folio_alloc use to reflect API changes. ruth/ 2007-12-22 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Update rm_folio_alloc use to reflect API changes.
2007-12-112007-12-12 Neal H. Walfield <neal@gnu.org>neal
* activity.h: Update comment. * activity.c (activity_consistency_check_): Don't assert that LRU_LOCK is held. * object.h (object_disown_simple): Don't call activity_consistency_check here. (object_desc_disown_): Likewise. (object_desc_claim_): Likewise. (object_desc_claim_): Likewise. * object.c (memory_object_alloc): Call activity_consistency_check. (memory_object_destroy): Likewise. (object_find_soft): Likewise. (folio_free): Likewise. (folio_object_alloc): Likewise.
2007-12-102007-12-10 Neal H. Walfield <neal@gnu.org>neal
* object.h (lru_lock): New declaration. (LINK_TEMPLATE): Assert that LRU_LOCK is held. (object_desc_disown_simple): Likewise. (object_disown_simple): Likewise. (object_desc_disown): Likewise. (object_disown): Likewise. (object_desc_claim): Likewise. (object_claim): Likewise. * object.c (lru_lock): Define. (memory_object_alloc): Lock LRU_LOCK when manipulating the LRU lists. (memory_object_destroy): Likewise. (object_find_soft): Likewise. (folio_free): Likewise. (folio_object_alloc): Likewise. * activity.c (activity_destroy): Lock LRU_LOCK when manipulating the LRU lists. (activity_destroy): Likewise. (activity_dump): Likewise. (activity_consistency_check_): Assert that LRU_LOCK is held. * ager.c (ager_loop): Lock LRU_LOCK when manipulating the LRU lists. * Makefile.am (t_link_CPPFLAGS): Include $(srcdir)/t-environment.h. (t_link_SOURCES): Add output.h, output.c and output-stdio.c. * t-environment.h: Move includes down. (environment_kip) [! _L4_TEST_MAIN]: Don't define, only declare. Remove static qualifier. (environment_api_version) [! _L4_TEST_MAIN]: Likewise. (environment_api_flags) [! _L4_TEST_MAIN]: Likewise. (environment_kernel_id) [! _L4_TEST_MAIN]: Likewise. (environment_utcb) [! _L4_TEST_MAIN]: Likewise. (environment_utcb_address) [! _L4_TEST_MAIN]: Likewise. (environment_init): Initialize ENVIRONMENT_UTCB_ADDRESS[_L4_UTCB_MY_GLOBAL_ID] to a non-NULL value. * t-link.c: Include "t-environment.h". (_L4_TEST_MAIN): Define. (program_name): Don't define. (lru_lock): Define. (main): Rename from this... (test): ... to this. Lock LRU_LOCK on entry and unlock on exit.
2007-12-102007-12-10 Neal H. Walfield <neal@gnu.org>neal
Add a page ager. * viengoos.c: Include "zalloc.h" and "ager.h". (ager_start): New function. (main): Call ager_start. * ager.h: New file. * ager.c: Likewise. * Makefile.am (viengoos_SOURCES): Add ager.h and ager.c. * object.h: Include <hurd/mutex.h>. (struct object_desc): Add field lock. * object.c (memory_object_alloc): Initialize ODESC->LOCK.
2007-12-10viengoos/neal
2007-12-10 Neal H. Walfield <neal@gnu.org> Properly account memory and folios. * activity.h (struct activity): Remove field objects. New fields parent_ptr, active, inactive_clean, inactive_dirty and dying. (root_activity): New declaration. (activity_create): Return void. Don't take priority, weight and storage_quota arguments. Update callers. (activity_for_each_ancestor): New macro. (activity_charge): New function. (activity_for_each_child): New macro. (activity_dump): New declaration. (activity_consistency_check_): Likewise. (activity_consistency_check): New macro. * activity.c (root_activity): Define. (activity_create): Return void. Don't take priority, weight and storage_quota arguments. Remove relevant functionality. Set CHILD->PARENT_PTR appropriately. Be careful when bootstrapping. (activity_destroy): Check that VICTIM->DYING is not set. If so, panic. Otherwise, set it. When recursively destroying an activity, call object_free, not activity_destroy, to clean up. Abandon all own frames. Assert that VICTIM->FRAMES and VICTIM_FOLIO_COUNT are 0. Set PARENT->CHILDREN to VICTIM->SIBLING_NEXT if VICTIM is the head of the list. (do_activity_dump): New function. (activity_dump): New function. (activity_consistency_check_): New function. * object.h: Don't include "thread.h". (struct object_desc): Remove field activity. Rename field alru to activity_lru. Rename field GLRU to global_lru. New fields dirty, age and activity. (LINK_TEMPLATE): New macro. Use it. (dirty): Remove declaration. (clean): Likewise. (global_active): New declaration. (global_inactive_dirty): Likewise. (global_inactive_clean): Likewise. (disowned): Likewise. (object_desc_disown_simple): New function. (object_disown_simple): Likewise. (object_desc_disown_): Likewise. (object_disown_): Likewise. (object_desc_disown): New macro. (object_disown): Likewise. (object_desc_claim_): New function. (object_claim_): Likewise. (object_desc_claim): New macro. (object_claim): Likewise. (folio_parent): Remove parameter principal. Update callers. (object_free): Improve parentheses. * object.c: Include "thread.h". (global_active): Define. (global_inactive_dirty): Likewise. (global_inactive_clean): Likewise. (disowned): Likewise. (object_init): Add asserts. (memory_object_setup): Rename from this... (memory_object_alloc): ... to this. Take additional parameters, the type, oid and version. Also set up the object's descriptor. Update callers. (memory_object_destroy): Add asserts. Remove object from the various linked lists. If OBJECT is an activity, assert that there are no frames allocated against it. (object_find_soft): If OBJECT is not accounted or inactive, assign to ACTIVITY. (folio_reparent): Rename from this... (folio_parent): ... to this. Remove the parameter PRINCIPAL. Use ACTIVITY where PRINCIPAL was previous used. Add asserts. Correctly add FOLIO to ACTIVITY's folio list. (folio_alloc): Check if the activity's storage quota allows the allocation of another folio. Account the allocation of the folio. (folio_free): Add asserts. Correctly account the folio. Clear FOLIO->NEXT and FOLIO->PREV. Disown FOLIO's frame. (folio_object_alloc): Assign OBJECT to ACTIVITY. When creating an activity, call activity_create. * cap.h (cap_set): Take additional parameter, a struct activity *. Pass it to cap copy. * cap.c Include "thread.h". (cap_set_object): Remove dead function. (cap_to_object): Clear CAP->TYPE if object_find returns NULL. (cap_shootdown): Asser that ACTIVITY is not NULL. * viengoos.c (root_activity): Don't define here. * t-as.c (root_activity): Remove static qualifier. * t-link.c: New file. * t-activity.c: New file. * Makefile.am (TESTS): Add t-activity and t-link. (t_activity_CPPFLAGS): New variable. (t_activity_SOURCES): Likewise. (t_activity_LDADD): Likewise. (t_link_CPPFLAGS): Likewise. (t_link_SOURCES): Likewise. * rm.h (RM_as_dump): Define. (rm_method_id_string): Remove case for RM_activity_create. (as_dump): New method. * server.c (server_loop): Add support for method as_dump. Remove support for method activity_create. hurd/ 2007-12-10 Neal H. Walfield <neal@gnu.org> * activity.h (RM_activity_create): Don't define. (activity_create): Remove method. ruth/ 2007-12-10 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Don't call rm_activity_create.
2007-11-28hurd/neal
2007-11-28 Neal H. Walfield <neal@gnu.org> * Makefile.am (includehurd_HEADERS): Add activity.h. * headers.m4: Create link from ../include/hurd/activity.h to activity.h. * activity.h: New file. viengoos/ 2007-11-28 Neal H. Walfield <neal@gnu.org> * activity.h (activity_allocate): Rename from this... (activity_create): ... to this. Remove arguments caller, folio, indent, activity and control. Add argument child. Update users. * activity.c (activity_allocate): Rename from this... (activity_create): ... to this. Remove arguments caller, folio, indent, activity and control. Add argument child. If CHILD is live, destroy it first. Correctly add CHILD to PARENT's children list. * activity.h (activity_destroy): Remove argument cap. Update callers. * activity.c (activity_destroy): Remove argument cap. Correctly destroy child activities and allocated folios. Correctly unlink from parent. * server.c (CAP_): Remove argument writablep. Add argument require_writable. Fail if REQUIRE_WRITABLE is true, and the object is not writable. (OBJECT_): Likewise. (CAP): Remove argument writablep. Add argument require_writable. Update callers. (OBJECT): Likewise. (server_loop): Add support for the activity_create method. * object.c (folio_free): Also update FOLIO->FOLIO_VERSION. (folio_object_alloc): Check if the object is a cap_activity_control, not a cap_activity. (folio_reparent): Correctly link FOLIO to PARENT. * t-as.c (test): Don't create a cap_activity object but a cap_activity_control object. * viengoos.c (system_task_load): Likewise. * cap.c (cap_to_object): Use cap_types_compatible when asserting that the capability's type and the object's type are identical. * thread.c (thread_exregs): Use cap_types_compatible when checking whether the thread has a valid activity object. * rm.h: Include <hurd/activity.h>. (rm_method_id_string): Handle the RM_activity_create case. ruth/ 2007-11-28 Neal H. Walfield <neal@gnu.org> * ruth.c: Include <hurd/activity.h>. (main): Add test for activity_create.
2007-11-23/neal
2007-11-23 Neal H. Walfield <neal@gnu.org> * README: Add note that Pistachio must be compiled with the Pager ExchangeRegisters configure option enabled. hurd/ 2007-11-23 Neal H. Walfield <neal@gnu.org> * thread.h: Include <hurd/addr-trans.h>. (HURD_EXREGS_EXCEPTION_THREAD): New definition. (trans_exregs): Take two additional arguments for determining how to copy the aspace address translation bits. Update callers. (thread_stop): New function. * rpc.h (RPC12_4): New macro. (RPC13_4): Likewise. * exceptions.h (exception_handler_init): New declaration. (exception_handler_loop): Likewise. libhurd-mm/ 2007-11-23 Neal H. Walfield <neal@gnu.org> * exceptions.c (exception_thread): Rename from this... (exception_handler_loop): ... to this. Update caller. * Makefile.am (libhurd_mm_a_SOURCES): Remove exceptions.h. * exceptions.h: Remove file. viengoos/ 2007-11-23 Neal H. Walfield <neal@gnu.org> * thread.h (thread_exregs): Take two additional arguments, a cap_addr_trans structure and a corresponding flags. Update users. * thread.c (thread_commission): Don't start thread THREAD. (control_to_string): New function. (thread_exregs): Take two additional arguments, a cap_addr_trans structure and a corresponding flags. Use them when copying a supplied capability into the address space slot of the thread. Support the HURD_EXREGS_EXCEPTION_THREAD flag. Improve error detection and debugging out. * server.c (server_loop): Let a void address for the activity slot imply the caller's current activity. Take two additional arguments, a cap_addr_trans structure and a corresponding flags argument. Pass them to thread_exregs. * viengoos.c (system_task_load): Set THREAD_ACTIVITY. Don't call thread_commission. Instead, call thread_exregs. ruth/ 2007-11-23 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Don't call rm_object_slot_copy_in to update the address space slot. Just use rm_thread_exregs. Add test for pthread library. * ia32-cmain.c (cmain): If _pthread_init_routine is not NULL, call it. Otherwise, just call finish directly.
2007-11-22viengoos/neal
2007-11-22 Neal H. Walfield <neal@gnu.org> * thread.h (struct thread): Add fields efalgs, user_handle and init. (thread_create_in): Rename from this... (thread_init): ... to this. Remove the activity argument. Update all users. (thread_create): Remove declaration. (thread_destroy): Rename from this... (thread_deinit): ... to this. Update all users. (thread_send_sp_ip): Remove declaration. (thread_exregs): New declaration. * thread.c: Include <hurd/thread.h>. (thread_lookup): Add additional asserts. (thread_create_in): Rename from this... (thread_init): ... to this. Remove the activity argument. Don't set THREAD->ACTIVITY. Set THREAD->INIT to true. (thread_create): Remove function. (thread_destroy): Rename from this... (thread_deinit): ... to this. Correctly calculate the bit to deallocate. Fix assert. Set THREAD->INIT to false. (thread_commission): If THREAD->INIT is false, first call thread_init. Correctly calculate the thread ids to initialize. (thread_send_sp_ip): Remove function. (thread_exregs): New function. * rm.h (RPC_STUB_PREFIX): Include <hurd/thread.h>. (rm_method_id_string): Support RM_thread_exregs. (THREAD_ASPACE_SLOT, THREAD_ACTIVITY_SLOT): Move from... * ../hurd/thread.h: ... to this new file. * server.c: Include <hurd/thread.h>. (server_loop): Implement the thread_exregs RPC. * viengoos.c (system_task_load): Set THREAD->ACTIVITY to a capability designating ROOT_ACTIVITY. hurd/ 2007-11-22 Neal H. Walfield <neal@gnu.org> * Makefile.am (includehurd_HEADERS): Add thread.h. * headers.m4: Link $(BUILDIR)/include/hurd/thread.h to thread.h. * thread.h: New file. * rpc.h: Include <errno.h>. ruth/ 2007-11-22 Neal H. Walfield <neal@gnu.org> * ruth.c: Include <hurd/thread.h>. (main): Add test case for thread creation.
2007-11-162007-11-16 Neal H. Walfield <neal@gnu.org>neal
* viengoos/Makefile.am: New file based on ../wortel/Makefile.am. * viengoos/headers.m4: New file. * viengoos/config.m4: New file based on ../wortel/config.m4. * viengoos/viengoos.h: New file. * viengoos/viengoos.c: New file. * viengoos/activity.h: Likewise. * viengoos/activity.c: Likewise. * viengoos/as.h: Likewise. * viengoos/as.c: Likewise. * viengoos/cap-lookup.c: Likewise. * viengoos/cap.h: Likewise. * viengoos/cap.c: Likewise. * viengoos/thread.h: New file. * viengoos/thread.c: New file. * viengoos/object.h: New file. * viengoos/object.c: New file. * viengoos/rm.h: New file. * viengoos/server.c: New file. * viengoos/server.h: New file. * viengoos/zalloc.h: Copied from ../physmem. * viengoos/zalloc.c: Copied from ../physmem. Don't include "output.h". Include <hurd/stddef.h>. Change uses of min_page_size to PAGESIZE. * viengoos/memory.h: New file. * viengoos/memory.c: New file. * viengoos/sigma0.c: Copy from ../wortel. * viengoos/sigma0.h: Copy from ../wortel. Don't include "shutdown.h". Include <hurd/stddef.h>. * viengoos/bits.h: Likewise. * viengoos/panic.c: New file. * viengoos/debug.c: Likewise. * viengoos/debug.h: Likewise. * viengoos/boot-modules.h: Likewise. * viengoos/boot-modules.c: Likewise. * viengoos/elf.h: Copied from ../wortel. * viengoos/loader.c: New file based on ../wortel/loader.c. * viengoos/loader.h: New file. * viengoos/multiboot.h: Copied from Grub. * viengoos/mmap.c: New file based on ../physmem/mmap.c. * viengoos/malloc-wrap.c: New file based on ../physmem/malloc-wrap.c. * viengoos/malloc.c: Version 2.8.3 of Doug Lea's malloc.c. * viengoos/malloc.h: Version 2.8.3 of Doug Lea's malloc.h. * viengoos/ia32-cmain.c: New file based on ../wortel/ia32-cmain.c. * viengoos/ia32-crt0.S: Copied from ../wortel. (STACK_SIZE): Use a 16 page stack. * viengoos/ia32-output.c: Copied from ../wortel. * viengoos/ia32-shutdown.c: Likewise. * viengoos/output.h: New file based on ../wortel/output.h. Include <stdarg.h>. (cprintf): New definition. (output_debug): Don't define. (debug): Don't define. * viengoos/output.c: New file based on ../wortel/output.c. Don't include <stdlib.h>. (vprintf): New function. (printf): Implement in terms of vprintf. * viengoos/output-none.c: Copied from ../wortel. * viengoos/output-serial.c: Likewise. * viengoos/output-stdio.c: New file. * viengoos/output-vga.c: Copied from ../wortel. * viengoos/shutdown.h: New file based on ../wortel/shutdown.h. Don't include "output.h". (panic): Don't define. (shutdown): Rename from this... (shutdown_machine): ... to this. * viengoos/shutdown.c: New file based on ../wortel/shutdown.c. (reset) [_L4_TEST_ENVIRONMENT]: Call abort. (halt) [_L4_TEST_ENVIRONMENT]: Call abort. (shutdown): Rename from this... (shutdown_machine): ... to this. * viengoos/t-environment.h: New file based on ../libl4/tests/environment.h. Protect from multiple inclusion. Include <hurd/stddef.h>. Include <string.h>. Include <l4/stubs.h>. (program_name): New declaration. (check_nr): Don't assume that val1 and val2 are _L4_word_t, use typeof instead. (main): Call output_init. * viengoos/t-as.c: New file.