---
name: "kenter"
section: "2"
platform: "linux"
package: "lam2-dev"
version: "6.3.2-3"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/kenter"
---

# kenter(2)

Enter process into LAM session.

## NAME

kenter - Enter process into LAM session.

## C SYNOPSIS

int kenter (char \*name, int priority);

## FORTRAN SYNOPSIS

subroutine KENTR (name, priority, ierr)\
 character name\*(\*)\
 integer priority, ierr

## DESCRIPTION

*kenter()* is the first function a LAM process must call to subsequently use LAM services. By calling underlying functions, *kenter()* accomplishes three important tasks. It initializes all relevant LAM data structures, particularly those for communication with the LAM daemon (see [kinit(2)](/kinit/2.md)). It registers with the local LAM daemon and sets the message synchronizing priority (see [kattach(2)](/kattach/2.md)). It also establishes a readable name by which the process can be remotely monitored and controlled (see [lpattach(2)](/lpattach/2.md)).

The *name* argument should be the name of the program (argv\[0\] is recommended) and becomes a convenient recognition string in the output of the [state(1)](/state/1.md) command. It is not used for any type of synchronization.

### Process Scheduling

LAM processes are scheduled by the host operating system. The *priority* argument determines which process will be synchronized first when many are blocked on the same message event and type (see [ksend(2)](/ksend/2.md)). The highest priority process is always favoured.

The LAM daemon works like a server. By not replying to a message passing request, it can effectively block a process from running. The daemon will also attempt to preempt a running process when delivering a LAM signal (see [kdoom(2)](/kdoom/2.md)).

## ERRORS

- ENOKERNEL

  LAM is not running on the local node.

- ENOKDESCRIPTORS

  The LAM daemon ran out of process descriptors.

## SEE ALSO

[kinit(2)](/kinit/2.md), [kattach(2)](/kattach/2.md), [lpattach(2)](/lpattach/2.md)
