Server Wait On Clients System - API Documentation
v1.6.4
Server Wait On Clients System.
|
Functions to process client lock flag options. More...
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
#include <libmgec/libmgec.h>
#include <libmgec/mge-message.h>
#include <libmgec/mge-errno.h>
#include <libmgesysutils/mge-remsyslog.h>
#include <swoc/libswocclient.h>
#include <swoc/libswoccommon.h>
Macros | |
#define | _Bool signed char |
#define | bool _Bool |
#define | false 0 |
#define | true 1 |
#define | __bool_true_false_are_defined 1 |
Functions | |
int | swc_show_status (void) |
Display client's lock status. More... | |
int | swc_show_srv_block_status (void) |
Display status of server blocking. More... | |
int | swc_block (void) |
Set block flag on server to prevent this client from setting any more locks. More... | |
int | swc_unblock (void) |
Remove block flag on server to allow this client to set locks. More... | |
int | swc_set_lock (void) |
Set lock flag on server. More... | |
int | swc_rel_lock (void) |
Release lock flag on server. More... | |
int | swc_client_wait (char *cnumlocks) |
Wait until only a maximum of cnumlocks for this client remains. More... | |
int | swc_reset (void) |
Reset the client on the server to 0 locks and unblocked. More... | |
Variables | |
char | locks_held [10] = "0" |
Holds the number of locks currently held during swc_client_wait(). More... | |
Functions to process client lock flag options.
Released under the GPLv3 only.
SPDX-License-Identifier: GPL-3.0-only
#define __bool_true_false_are_defined 1 |
#define _Bool signed char |
#define bool _Bool |
#define false 0 |
#define true 1 |
int swc_block | ( | void | ) |
Set block flag on server to prevent this client from setting any more locks.
On error mge_errno will be set.
int swc_client_wait | ( | char * | cnumlocks | ) |
Wait until only a maximum of cnumlocks for this client remains.
If cnumlocks > 0 this realistically means that a previous command in this sequence would have been a lock request. On error mge_errno will be set.
cnumlocks | Wait until the number of locks is <= this value. This value must be 0 or 1. |
int swc_rel_lock | ( | void | ) |
Release lock flag on server.
On error mge_errno will be set.
int swc_reset | ( | void | ) |
Reset the client on the server to 0 locks and unblocked.
On error mge_errno will be set.
int swc_set_lock | ( | void | ) |
Set lock flag on server.
On error mge_errno will be set.
int swc_show_srv_block_status | ( | void | ) |
Display status of server blocking.
On error mge_errno will be set.
int swc_show_status | ( | void | ) |
Display client's lock status.
On error mge_errno will be set.
int swc_unblock | ( | void | ) |
Remove block flag on server to allow this client to set locks.
On error mge_errno will be set.
char locks_held[10] = "0" |
Holds the number of locks currently held during swc_client_wait().
This value can be accessed in a handler if a signal is received.