Add proper per-file copyright notices/licenses and top-level license.
[bluesky.git] / TBBT / trace_play / sfs_m_msg.c
1 #ifndef lint
2 static char sfs_m_msgSid[] = "@(#)sfs_m_msg.c   2.1     97/10/23";
3 #endif
4
5 /*
6  *   Copyright (c) 1992-1997,2001 by Standard Performance Evaluation Corporation
7  *      All rights reserved.
8  *              Standard Performance Evaluation Corporation (SPEC)
9  *              6585 Merchant Place, Suite 100
10  *              Warrenton, VA 20187
11  *
12  *      This product contains benchmarks acquired from several sources who
13  *      understand and agree with SPEC's goal of creating fair and objective
14  *      benchmarks to measure computer performance.
15  *
16  *      This copyright notice is placed here only to protect SPEC in the
17  *      event the source is misused in any manner that is contrary to the
18  *      spirit, the goals and the intent of SPEC.
19  *
20  *      The source code is provided to the user or company under the license
21  *      agreement for the SPEC Benchmark Suite for this product.
22  */
23
24 /*****************************************************************
25  *                                                               *
26  *      Copyright 1991,1992  Legato Systems, Inc.                *
27  *      Copyright 1991,1992  Auspex Systems, Inc.                *
28  *      Copyright 1991,1992  Data General Corporation            *
29  *      Copyright 1991,1992  Digital Equipment Corporation       *
30  *      Copyright 1991,1992  Interphase Corporation              *
31  *      Copyright 1991,1992  Sun Microsystems, Inc.              *
32  *                                                               *
33  *****************************************************************/
34
35 /*
36  *.Exported_routines
37  *      int * signal_sfs_1(sync_string *, CLIENT *);
38  *
39  *.Local_routines
40  *      None.
41  *
42  *.Revision_history
43  *      04-Dec-91       Keith           Include sfs_def.h for SYSV/SVR4
44  *                                      mem* routines.
45  *      17-Jun-91       Teelucksingh    Create multi-client synchronization
46  *                                      rpc definition
47  */
48
49
50 /*
51  * -------------------------  Include Files  -------------------------
52  */
53
54 /*
55  * ANSI C headers
56  */
57 #include <stdio.h>
58 #include <stdlib.h>
59 #include <string.h>
60 #include <errno.h>
61  
62 #include <sys/types.h>
63 #include <sys/stat.h> 
64
65 #include "sfs_c_def.h"
66 #include "sfs_m_def.h"
67
68 /*
69  * -----------------------  Static Definitions  -----------------------
70  */
71
72 /*
73  * Almost all rpcs are sent over TCP so we have a reliable transport,
74  * unfortunately the initialization phase may highly overload the
75  * server and the previous default of 5 seconds might timeout before
76  * it gets acknowledged.  The risk of a large timeout is that there is
77  * an added period after a stop message is sent.  This is usually not
78  * a problem.
79  */
80 static struct timeval TIMEOUT = { 60, 0 };
81
82
83 /*
84  * -------------------  Multi-client Message Handling  -------------------
85  */
86
87 int *
88 signal_sfs_1(
89     sync_string *       argp,
90     CLIENT *            clnt)
91 {
92     static int          res;
93
94     (void) memset((char *) &res, '\0', sizeof(res));
95     if (clnt_call(clnt, SIGNAL_SFS, xdr_sync_string, (caddr_t)argp, xdr_int,
96                   (caddr_t)&res, TIMEOUT) != RPC_SUCCESS) {
97         return (NULL);
98     }
99     return (&res);
100 } /* signal_sfs_1 */
101
102
103 /* sfs_m_msg.c */