clnt_raw.c (a986ef5788bd3338d2a970eb96104824e4a0e3bb) | clnt_raw.c (235baf269e492159336326a12da1ca09fbba85db) |
---|---|
1/* $NetBSD: clnt_raw.c,v 1.20 2000/12/10 04:12:03 christos Exp $ */ 2 3/* 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5 * unrestricted use provided that this legend is included on all tape 6 * media and as a part of the software program in whole or part. Users 7 * may copy or modify Sun RPC without charge, but are not authorized 8 * to license or distribute it to anyone else except as part of a product or --- 43 unchanged lines hidden (view full) --- 52#include <assert.h> 53#include <err.h> 54#include <stdio.h> 55#include <stdlib.h> 56 57#include <rpc/rpc.h> 58#include <rpc/raw.h> 59#include "un-namespace.h" | 1/* $NetBSD: clnt_raw.c,v 1.20 2000/12/10 04:12:03 christos Exp $ */ 2 3/* 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5 * unrestricted use provided that this legend is included on all tape 6 * media and as a part of the software program in whole or part. Users 7 * may copy or modify Sun RPC without charge, but are not authorized 8 * to license or distribute it to anyone else except as part of a product or --- 43 unchanged lines hidden (view full) --- 52#include <assert.h> 53#include <err.h> 54#include <stdio.h> 55#include <stdlib.h> 56 57#include <rpc/rpc.h> 58#include <rpc/raw.h> 59#include "un-namespace.h" |
60#include "mt_misc.h" |
|
60 | 61 |
61extern mutex_t clntraw_lock; 62 | |
63#define MCALL_MSG_SIZE 24 64 65/* 66 * This is the "network" we will be moving stuff over. 67 */ 68static struct clntraw_private { 69 CLIENT client_object; 70 XDR xdr_stream; --- 220 unchanged lines hidden (view full) --- 291 CLIENT *cl; 292{ 293} 294 295static struct clnt_ops * 296clnt_raw_ops() 297{ 298 static struct clnt_ops ops; | 62#define MCALL_MSG_SIZE 24 63 64/* 65 * This is the "network" we will be moving stuff over. 66 */ 67static struct clntraw_private { 68 CLIENT client_object; 69 XDR xdr_stream; --- 220 unchanged lines hidden (view full) --- 290 CLIENT *cl; 291{ 292} 293 294static struct clnt_ops * 295clnt_raw_ops() 296{ 297 static struct clnt_ops ops; |
299 extern mutex_t ops_lock; | |
300 301 /* VARIABLES PROTECTED BY ops_lock: ops */ 302 303 mutex_lock(&ops_lock); 304 if (ops.cl_call == NULL) { 305 ops.cl_call = clnt_raw_call; 306 ops.cl_abort = clnt_raw_abort; 307 ops.cl_geterr = clnt_raw_geterr; 308 ops.cl_freeres = clnt_raw_freeres; 309 ops.cl_destroy = clnt_raw_destroy; 310 ops.cl_control = clnt_raw_control; 311 } 312 mutex_unlock(&ops_lock); 313 return (&ops); 314} | 298 299 /* VARIABLES PROTECTED BY ops_lock: ops */ 300 301 mutex_lock(&ops_lock); 302 if (ops.cl_call == NULL) { 303 ops.cl_call = clnt_raw_call; 304 ops.cl_abort = clnt_raw_abort; 305 ops.cl_geterr = clnt_raw_geterr; 306 ops.cl_freeres = clnt_raw_freeres; 307 ops.cl_destroy = clnt_raw_destroy; 308 ops.cl_control = clnt_raw_control; 309 } 310 mutex_unlock(&ops_lock); 311 return (&ops); 312} |