ChorusOS 5.0 Application Developer's Guide

Local Access Points in ChorusOS Systems

Local Access Points (LAPs) are a low overhead mechanism for calling service routines in supervisor actors on the local site by both user and supervisor actor calls.

A LAP is designated and invoked via its LAP descriptor. A LAP descriptor can be directly transmitted by a server to one or more specific client actors via shared memory or as an argument to another invocation.

For more information, refer to the lapInvoke(2K), lapResolve(2K), svLapBind(2K), svLapCreate(2K) and svLapDelete(2K) man pages.

The LAPBIND Feature

The LAPBIND feature provides a nameserver from which a LAP descriptor may be requested and obtained indirectly, using a static symbolic name. This symbolic name may be an arbitrary character string, whose size is limited to K_LAPNAMEMAX (currently set to 7 characters) . Otherwise, svLapBind returns K_ENOMEM. Using the nameserver, a LAP may be exported to any potential client that knows the symbolic name of the LAP (or of the service exported by the LAP).

A server may optionally establish a name binding using svLapBind(2K). The binding can be removed using svLapUnbind(2K). A client uses lapResolve(2K) to obtain a LAP descriptor, given its symbolic name, and optionally waiting if the name is not yet available.

The LAPSAFE Feature

If the LAPSAFE feature has been configured in the system, a LAP frame descriptor is allocated to register the calling thread as a temporary resource of the invoked actor. Each LAP frame has an associated level (LAP frame level) which represents the number of LAP frames for the considered thread.

LAPSAFE enforces stronger checking during LAP invocation. This ensures that the microkernel will synchronize the svLapDelete() operation with concurrent lap invocations. The full context of the calling thread is saved prior to the LAP invocation. This ensures that the calling thread can return from its invocation even if a failure occurs during the execution of the LAP handler. This option is mandatory if a LAP is called from user mode.