Motr  M0
wlock_helper.c File Reference
#include "lib/trace.h"
#include "lib/string.h"
#include "rm/rm.h"
#include "rm/rm_rwlock.h"
#include "rpc/rpclib.h"
Include dependency graph for wlock_helper.c:

Go to the source code of this file.

Data Structures

struct  wlock_ctx
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_RM
 

Functions

static void write_lock_complete (struct m0_rm_incoming *in, int32_t rc)
 
static void write_lock_conflict (struct m0_rm_incoming *in)
 
static int wlock_ctx_create (struct m0_rpc_machine *rpc_mach, const char *rm_ep)
 
static int wlock_ctx_connect (struct wlock_ctx *wlx)
 
static void wlock_ctx_creditor_setup (struct wlock_ctx *wlx)
 
static void _write_lock_get (struct wlock_ctx *wlx)
 
static void wlock_ctx_destroy (struct wlock_ctx *wlx)
 
static void wlock_ctx_disconnect (struct wlock_ctx *wlx)
 
static void wlock_ctx_owner_windup (struct wlock_ctx *wlx)
 
static void wlock_ctx_creditor_unset (struct wlock_ctx *wlx)
 
static void _write_lock_put (struct wlock_ctx *wlx)
 
M0_INTERNAL void rm_write_lock_put ()
 
M0_INTERNAL int rm_write_lock_get (struct m0_rpc_machine *rpc_mach, const char *rm_ep)
 

Variables

struct wlock_ctx wlx
 
static struct m0_rm_incoming_ops ri_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_RM

Definition at line 23 of file wlock_helper.c.

Function Documentation

◆ _write_lock_get()

static void _write_lock_get ( struct wlock_ctx wlx)
static

Definition at line 111 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _write_lock_put()

static void _write_lock_put ( struct wlock_ctx wlx)
static

Definition at line 172 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_write_lock_get()

M0_INTERNAL int rm_write_lock_get ( struct m0_rpc_machine rpc_mach,
const char *  rm_ep 
)

Definition at line 195 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_write_lock_put()

M0_INTERNAL void rm_write_lock_put ( )

Definition at line 186 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wlock_ctx_connect()

static int wlock_ctx_connect ( struct wlock_ctx wlx)
static

Definition at line 91 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wlock_ctx_create()

static int wlock_ctx_create ( struct m0_rpc_machine rpc_mach,
const char *  rm_ep 
)
static

Definition at line 76 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wlock_ctx_creditor_setup()

static void wlock_ctx_creditor_setup ( struct wlock_ctx wlx)
static

Definition at line 101 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wlock_ctx_creditor_unset()

static void wlock_ctx_creditor_unset ( struct wlock_ctx wlx)
static

Definition at line 162 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wlock_ctx_destroy()

static void wlock_ctx_destroy ( struct wlock_ctx wlx)
static

Definition at line 122 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wlock_ctx_disconnect()

static void wlock_ctx_disconnect ( struct wlock_ctx wlx)
static

Definition at line 133 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wlock_ctx_owner_windup()

static void wlock_ctx_owner_windup ( struct wlock_ctx wlx)
static

Definition at line 149 of file wlock_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_lock_complete()

static void write_lock_complete ( struct m0_rm_incoming in,
int32_t  rc 
)
static

Definition at line 57 of file wlock_helper.c.

Here is the call graph for this function:

◆ write_lock_conflict()

static void write_lock_conflict ( struct m0_rm_incoming in)
static

Definition at line 66 of file wlock_helper.c.

Variable Documentation

◆ ri_ops

struct m0_rm_incoming_ops ri_ops
static
Initial value:
= {
.rio_complete = write_lock_complete,
.rio_conflict = write_lock_conflict,
}
static void write_lock_complete(struct m0_rm_incoming *in, int32_t rc)
Definition: wlock_helper.c:57
static void write_lock_conflict(struct m0_rm_incoming *in)
Definition: wlock_helper.c:66

Definition at line 71 of file wlock_helper.c.

◆ wlx

struct wlock_ctx wlx