summaryrefslogtreecommitdiff
path: root/viengoos/activity.c
AgeCommit message (Collapse)Author
2008-12-18Add vg_ prefix to the (hopefully) remaining viengoos symbols.Neal H. Walfield
2008-12-18 Neal H. Walfield <neal@gnu.org> * viengoos/activity.h (struct activity_memory_policy): Rename from this... (struct vg_activity_memory_policy): ... to this. Update users. (struct activity_policy): Rename from this... (struct vg_activity_policy): ... to this. Update users. (ACTIVITY_STATS_PERIODS): Rename from this... (VG_ACTIVITY_STATS_PERIODS): ... to this. Update users. (struct activity_stats): Rename from this... (struct vg_activity_stats): ... to this. Update users. (struct activity_info): Rename from this... (struct vg_activity_info): ... to this. Update users. * viengoos/addr.h (struct addr): Rename from this... (struct vg_addr): ... to this. Update users. * viengoos/cap.h (struct object_policy): Rename from this... (struct vg_object_policy): ... to this. Update users. (struct object_name): Rename from this... (struct vg_object_name): ... to this. Update users. (struct object): Rename from this... (struct vg_object): ... to this. Update users. * viengoos/folio.h (struct folio_policy): Rename from this... (struct vg_folio_policy): ... to this. Update users. (struct folio): Rename for this... (struct vg_folio): ... to this. Update users. * viengoos/thread.h (HURD_EXREGS_SET_UTCB): Rename from this... (VG_EXREGS_SET_UTCB): ... to this. Update users. (HURD_EXREGS_SET_EXCEPTION_MESSENGER): Rename from this... (VG_EXREGS_SET_EXCEPTION_MESSENGER): ... to this. Update users. (HURD_EXREGS_SET_ASPACE): Rename from this... (VG_EXREGS_SET_ASPACE): ... to this. Update users. (HURD_EXREGS_SET_ACTIVITY): Rename from this... (VG_EXREGS_SET_ACTIVITY): ... to this. Update users. (HURD_EXREGS_SET_SP): Rename from this... (VG_EXREGS_SET_SP): ... to this. Update users. (HURD_EXREGS_SET_IP): Rename from this... (VG_EXREGS_SET_IP): ... to this. Update users. (HURD_EXREGS_SET_SP_IP): Rename from this... (VG_EXREGS_SET_SP_IP): ... to this. Update users. (HURD_EXREGS_SET_EFLAGS): Rename from this... (VG_EXREGS_SET_EFLAGS): ... to this. Update users. (HURD_EXREGS_SET_USER_HANDLE): Rename from this... (VG_EXREGS_SET_USER_HANDLE): ... to this. Update users. (HURD_EXREGS_SET_REGS): Rename from this... (VG_EXREGS_SET_REGS): ... to this. Update users. (HURD_EXREGS_GET_REGS): Rename from this... (VG_EXREGS_GET_REGS): ... to this. Update users. (HURD_EXREGS_START): Rename from this... (VG_EXREGS_START): ... to this. Update users. (HURD_EXREGS_STOP): Rename from this... (VG_EXREGS_STOP): ... to this. Update users. (HURD_EXREGS_ABORT_SEND): Rename from this... (VG_EXREGS_ABORT_SEND): ... to this. Update users. (HURD_EXREGS_ABORT_RECEIVE): Rename from this... (VG_EXREGS_ABORT_RECEIVE): ... to this. Update users. (HURD_EXREGS_ABORT_IPC): Rename from this... (VG_EXREGS_ABORT_IPC): ... to this. Update users. (struct hurd_thread_exregs_in): Rename form this... (struct vg_thread_exregs_in): ... to this. Update users. (struct hurd_thread_exregs_out): Rename form this... (struct vg_thread_exregs_out): ... to this. Update users. (RPC_STUB_PREFIX): Define to vg_activation. Update users. (RPC_ID_PREFIX): Define to VG_ACTIVATION. Update users. (ACTIVATION_fault): Rename from this... (VG_ACTIVATION_fault): ... to this. Update users.
2008-12-17Add a "vg_" to public viengoos identifiers.Neal H. Walfield
2008-12-17 Neal H. Walfield <neal@gnu.org> * viengoos/activity.h: Add a "vg_" to public viengoos identifiers. Update users. * viengoos/addr-trans.h: Likewise. * viengoos/addr.h: Likewise. * viengoos/cap.h: Likewise. * viengoos/folio.h: Likewise. * viengoos/futex.h: Likewise. * viengoos/rpc.h: Likewise. * viengoos/thread.h: Likewise.
2008-12-17Move viengoos header files to libviengoos.Neal H. Walfield
/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * libviengoos: New directory. * Makefile.am (SUBDIRS): Add libviengoos. * configure.ac: Include libviengoos/headers.m4. Generate libviengoos/Makefile. hurd/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * activity.h: Move to ../libviengoos/viengoos. Update references. * addr-trans.h: Likewise. * addr.h: Likewise. * cap.h: Likewise. * folio.h: Likewise. * futex.h: Likewise. * ipc.h: Likewise. * message.h: Likewise. * messenger.h: Likewise. * rpc.h: Likewise. * thread.h: Move viengoos specific bits... * ../libviengoos/viengoos/thread.h: ... to this new file. * thread.h (struct hurd_utcb): New structure. * exceptions.h (hurd_utcb): Use a struct hurd_utcb *, not a struct vg_utcb *. Update users. (hurd_activation_state_alloc): Likewise. (hurd_activation_state_free): Likewise. (hurd_activation_handler_activated): Likewise. (hurd_activation_handler_normal): Likewise. * t-addr-trans.c: Move to ../libviengoos. * t-addr.c: Likewise. * t-rpc.c: Likewise. * Makefile.am (TESTS, check_PROGRAMS, t_addr_CPPFLAGS) (t_addr_SOURCES, t_addr_trans_CPPFLAGS, t_addr_trans_SOURCES) (t_rpc_CPPFLAGS, t_rpc_SOURCES): Move from this file... * ../libviengoos/Makefile.am. * Makefile.am (includehurd_HEADERS): Don't mention activity.h, addr-trans.h, addr.h, cap.h, folio.h, futex.h, ipc.h, message.h or messenger.h. * headers.m4: Don't create a link to hurd/addr.h, hurd/addr-trans.h, hurd/cap.h, hurd/folio.h, hurd/rpc.h, hurd/activity.h, hurd/futex.h, hurd/message.h, hurd/messenger.h or hurd/ipc.h. libviengoos/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * Makefile.am: New file. * headers.m4: Likewise. * t-addr-trans.c: Move from ../hurd. * t-addr.c: Likewise. * t-rpc.c: Likewise. * viengoos.h: Likewise. * viengoos/activity.h: Likewise. * viengoos/addr-trans.h: Likewise. * viengoos/addr.h: Likewise. * viengoos/cap.h: Likewise. * viengoos/folio.h: Likewise. * viengoos/futex.h: Likewise. * viengoos/ipc.h: Likewise. * viengoos/message.h: Likewise. * viengoos/messenger.h: Likewise. * viengoos/rpc.h: Likewise. * viengoos/misc.h: Moved from ../viengoos/rm.h. * viengoos/thread.h: New file split from ../hurd/thread.h. libpthread/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * Makefile.am: New file. * headers.m4: Likewise. * t-addr-trans.c: Move from ../hurd. * t-addr.c: Likewise. * t-rpc.c: Likewise. * viengoos.h: Likewise. * viengoos/activity.h: Likewise. * viengoos/addr-trans.h: Likewise. * viengoos/addr.h: Likewise. * viengoos/cap.h: Likewise. * viengoos/folio.h: Likewise. * viengoos/futex.h: Likewise. * viengoos/ipc.h: Likewise. * viengoos/message.h: Likewise. * viengoos/messenger.h: Likewise. * viengoos/rpc.h: Likewise. * viengoos/misc.h: Moved from ../viengoos/rm.h. * viengoos/thread.h: New file split from ../hurd/thread.h. viengoos/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * rm.h: Move from here... * ../libviengoos/viengoos/misc.h: ... to here. Update users. * headers.m4: Don't link rm.h to hurd/rm.h. * Makefile.am (viengoos_SOURCES): Remove rm.h.
2008-11-18Only print configuration when destroying the root activity.Neal H. Walfield
2008-11-18 Neal H. Walfield <neal@gnu.org> * activity.c (activity_destroy): Only print configuration when destroying the root activity.
2008-11-14Dump the current statistics whenever an activity is destroyed.Neal H. Walfield
2008-11-14 Neal H. Walfield <neal@gnu.org> * activity.c (activity_destroy): Dump the current statistics whenever an activity is destroyed.
2008-11-04In the activity structure, use a pair of lists per priority level.Neal H. Walfield
2008-11-04 Neal H. Walfield <neal@gnu.org> * activity.h (struct activity): Replace fields active, inactive, priorities and priorities_count with fields frames_ and frames. Update users. * object.h (activity_lru): Rename from this... (activity): ... to this. Update users. * activity.c (activity_destroy): When moving frames claimed by a child to its parent's lowest priority level, update each frame's respective priority. (activity_prepare) [! NDEBUG]: Initialize priority levels.
2008-07-042008-07-04 Neal H. Walfield <neal@gnu.org>neal
* activity.c: Include "zalloc.h" and "memory.h". (activity_dump): Also print the total amount of memory, the available memory, and the memory on the laundry list.
2008-06-292008-06-29 Neal H. Walfield <neal@gnu.org>neal
* activity.c (activity_destroy): After printing the profile data, print the enabled debugging options. (do_activity_dump): Also print how many free allocations the activity has, its karma and the number of excluded frames.
2008-06-26hurd/neal
2008-06-26 Neal H. Walfield <neal@gnu.org> * cap.h (RM_object_name): Define. (struct object_name): New struct. (object_name): New method. viengoos/ 2008-06-26 Neal H. Walfield <neal@gnu.org> * rm.h (rm_method_id_string): Handle the RM_object_name case. * server.c (server_loop): Implement the object_name method. * activity.h (struct activity): New field name. * thread.h (struct thread): Likewise. * object.h (OBJECT_NAME_FMT): New macro. (OBJECT_NAME_PRINTF): Likewise. * activity.c: Include "thread.h". (do_activity_dump): Use OBJECT_NAME_FMT and OBJECT_NAME_PRINTF rather than OID_FMT and OID_PRINTF. (activity_dump): Only call do_activity_dump if debugging output is enabled. * pager.c: Include "thread.h". (pager_collect): Use OBJECT_NAME_FMT and OBJECT_NAME_PRINTF rather than OID_FMT and OID_PRINTF. * ager.c (update_stats): Likewise.
2008-06-232008-06-23 Neal H. Walfield <neal@gnu.org>neal
* cap.h (OBJECT_PRIORITY_DEFAULT): Define.
2008-06-222008-06-22 Neal H. Walfield <neal@gnu.org>neal
* activity.c: Include "profile.h". (activity_destroy): If ACTIVITY is the root activity, dump the profile statistics before panicking.
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
* activity.c (activity_destroy): Move objects from VICTIM's priority tree to its VICTIM->PARENT's priority tree, not its inactive lists.
2008-02-202008-02-20 Neal H. Walfield <neal@gnu.org>neal
* list.h (struct list) [! NDEBUG]: Add field name. (list_init): Add parameter name. Update users. (LIST_CLASS): Update template to account for list_init changes. (list_unlink): Improve debugging output. * activity.c (activity_prepare): Explicitly initialize all lists.
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
* activity.h: Include "list.h". (LIST_CLASS_TYPE): Declare a activity_children list. (struct activity): Change children's type to a struct activity_children_list. Replace sibling_next and sibling_prev with sibling, a struct list_node. (activity_for_each_inmemory_child): Remove macro. * activity.c (children_list_insert_after): Remove function. Replace uses with appropriate list function. (children_list_detach): Likewise. * pager.c (pager_collect): Replace use of activity_for_each_inmemory_child with a list iterator. * ager.c (ager_loop): Likewise.
2008-02-132008-02-13 Neal H. Walfield <neal@gnu.org>neal
* activity.h (activity_policy_update): New declaration. * activity.c (children_list_insert_after): New function. (children_list_detach): Likewise. (activity_prepare): Use the above to insert ACTIVITY onto its parent's children list. Keep the list is priority sorted order. (activity_deprepare): Likewise, but to remove ACTIVITY from its parent's children list. (activity_policy_update): New function. * server.c (server_loop): Use activity_policy_update to update an activity's policy.
2008-01-132008-01-13 Neal H. Walfield <neal@gnu.org>neal
* activity.c (activity_destroy): When making a frame inactive, be sure to reset its age to 0. * list.h (list_unlink): Improve debugging output.
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-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-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-112007-12-11 Neal H. Walfield <neal@gnu.org>neal
* activity.c (activity_destroy): Clear VICTIM->SIBLING_NEXT.TYPE and VICTIM->SIBLING_PREV.TYPE. Add additional asserts.
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-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-222007-11-22 Neal H. Walfield <neal@gnu.org>neal
* activity.c (activity_destroy): Don't call OBJECT_FREE. * thread.c (thread_destroy): Likewise.
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.