Initializes lightweight attach and detach subsystem for the current process with the given settings.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
#include <sys/adspace.h>
int as_lw_pool_init (pool_size, flags)
size_t pool_size;
uint flags;
Item | Description |
---|---|
pool_size | Specifies the maximum number of bytes that can be attached by lightweight services at one time by each thread of this process. |
flags | Specifies flag options for this kernel service. Valid values are 0 and LW_DEBUG. |
The as_lw_pool_init kernel service initializes the lightweight pool size and flag settings for the current process. Once it has been called, these settings are fixed and cannot be changed for the process.
If LW_DEBUG is set in the flags parameter, the risk of illegal data access will be removed from calls to the as_lw_att64 kernel service and the as_lw_det64 kernel service. This setting allows users to debug problems that are caused by incorrect use of these services.
Processes that have called the as_lw_pool_init kernel service can use the other lightweight kernel services (as_lw_att64 and as_lw_det64) to attach and detach virtual memory regions represented by a cross memory descriptor. These kernel services are used on a per-thread basis, that is if one thread uses the as_lw_att64 kernel service to attach virtual memory to a region of its address space, that region cannot be addressed by any other thread, and it must be detached by the same thread by using the as_lw_det64 kernel service.
This service will operate correctly only for 64-bit user address spaces. It will not work for kernel processes (kprocs).
The as_lw_pool_init kernel service can be called from a 64-bit process environment only.
Item | Description |
---|---|
ENOSYS | The service was called by a 32-bit process. |
EEXIST | The as_lw_pool_init kernel service has already been successfully completed for this process. |
EINVAL | Invalid flag settings or the pool_size parameter is 0. |
EPERM | Called by a user thread that is not 1:1 with a kernel thread. |
The as_lw_pool_init kernel service is part of Base Operating System (BOS) Runtime.