#include <lov_cl_internal.h>
Data Fields | |
| cl_object | lo_cl |
| cfs_rw_semaphore_t | lo_type_guard |
| Serializes object operations with transitions between layout types. | |
| enum lov_layout_type | lo_type |
| Type of an object. | |
| lov_object::lov_layout_state | u |
| cfs_task_t * | lo_owner |
| Thread that acquired lov_object::lo_type_guard in an exclusive mode. | |
Data Structures | |
| union | lov_layout_state |
lov object has particular layout type, determining how top-object is built on top of sub-objects. Layout type can change dynamically. When this happens, lov_object::lo_type_guard semaphore is taken in exclusive mode, all state pertaining to the old layout type is destroyed, and new state is constructed. All object methods take said semaphore in the shared mode, providing serialization against transition between layout types.
To avoid multiple `if' or `switch' statements, selecting behavior for the current layout type, object methods perform double-dispatch, invoking function corresponding to the current layout type.
Type of an object.
Protected by lov_object::lo_type_guard.
| cfs_rw_semaphore_t lov_object::lo_type_guard |
Serializes object operations with transitions between layout types.
This semaphore is taken in shared mode by all object methods, and is taken in exclusive mode when object type is changed.