Rtnl2CloseClock

Rtnl2CloseClock closes a clock object opened by Rtnl2OpenClock.

Syntax

Copy
BOOL Rtnl2CloseClock(
    [in] RTNL2_HCLOCK Clock
);

Parameters

[in] Clock

A handle to the clock object to close (see RTNL2_HCLOCK).

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Possible error codes:

Error code Meaning

ERROR_NOT_READY

The calling process has not called Rtnl2Init.

ERROR_INVALID_PARAMETER

The supplied Clock handle is invalid.

RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT

The NL2 process didn’t reply within an acceptable delay.

RTNL2_ERROR_NO_MORE_COMMUNICATION

Unable to communicate with the NL2 process. This might be because the NL2 process is no longer running, or because an application process thread was terminated during a previous call to an NL2 API function.

Remarks

After a successful call to this function, the supplied Clock handle is no longer valid and cannot be used as a parameter of other API functions.

If the handle was opened with the RTNL2_CLOCK_FLAG_MODIFY flag, closing it releases the modification lock on that clock, allowing another process to open it with the RTNL2_CLOCK_FLAG_MODIFY flag.

Characteristics

Real-time

Deterministic

No

Shutdown-safe

No

Local memory usage

Process

External MSpace usage

Internal MSpace usage

System

No

No

NL2 process

No

No

Calling process

No

No

Windows contiguous memory usage

Usage

No

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

Rtnl2Api.h

Rtnl2Api.lib

See Also: