SC_GCLOCK_READY(2)
SCORE-D SYSTEM CALLS
SC_GCLOCK_READY(2)
NAME
sc_gclock_ready - check if global clock is available or not

SYNOPSIS
#include <sc.h>
int sc_gclock_ready(int flag);

DESCRIPTION
Some PM devices supprts global clock (time stamp) facility. This SCore-D system call checks if SCore-D has a PM device supporting the global clock. Since not all PM device has global clock facility and SCore-D takes care about the compensation of the global clock on all hosts, users have to check if the global clock is avialable and compensation is done using this system call.

If flag is not zero, and the global clock compensation is not yet done, then sc_gclock_ready() blocks until it is ready. Otherwise it returns immediately, and returns some error number described below.

RETURN VALUES
sc_gclock_ready() always returns 0 if it succeeds. Otherwise it returns the following error number.

ERRORS
ENODEV
Global clock is not supported
EBUSY
Global clock compensation is not yet done
EINTR
Job is restarted from a checkpoint during the systemcall

SEE ALSO
sc_get_global_time(3)

$Id: sc_gclock_ready.html,v 1.2 2002/02/17 04:25:26 kojima Exp $