1rsm_get_segmentid_ranRgeem(o3tReSMS)hared Memory Library Frusnmc_tgieotn_ssegmentid_range(3RSM)
2
3
4

NAME

6       rsm_get_segmentid_range - get segment ID range
7

SYNOPSIS

9       cc [ flag... ] file... -lrsm [ library... ]
10       #include <rsmapi.h>
11
12       int rsm_get_segmentid_range(const char *appid,
13            rsm_memseg_id_t *baseid, uint32_t *length);
14
15

DESCRIPTION

17       RSM segment IDs can be either specified by the application or generated
18       by the  system  using  the   rsm_memseg_export_publish(3RSM)  function.
19       Applications  that specify segment IDs require a reserved range of seg‐
20       ment IDs that they can use. This can be achieved by using  rsm_get_seg‐
21       mentid_range()  and  by reserving a range of segment IDs in the segment
22       ID  configuration  file,  /etc/rsm/rsm.segmentid.  The  rsm_get_segmen‐
23       tid_range()  function can be used by applications to obtain the segment
24       ID range reserved for them. The appid  argument  is  a  null-terminated
25       string  that  identifies the application. The baseid argument points to
26       the location where the starting segment ID of  the  reserved  range  is
27       returned.  The  length argument points to the location where the number
28       of reserved segment IDs is returned.
29
30
31       The application can use any value starting  at  baseid  and  less  than
32       baseid+length. The application should use an offset within the range of
33       reserved segment IDs to obtain a segment ID such that if the baseid  or
34       length is modified, it will still be within its reserved range.
35
36
37       It  is the responsibility of the system administrator to make sure that
38       the segment ID ranges are properly administered  (such  that  they  are
39       non-overlapping,  the file on various nodes of the cluster have identi‐
40       cal entries, and so forth.) Entries in the /etc/rsm/rsm.segmentid  file
41       are of the form:
42
43         #keyword       appid    baseid    length
44         reserved     SUNWfoo  0x600000  1000
45
46
47
48
49       The  fields  in  the  file  are  separated by tabs or blanks. The first
50       string is a keyword "reserve", followed by the  application  identifier
51       (a  string  without spaces), the baseid (the starting segment ID of the
52       reserved range in hexadecimal), and the length (the number  of  segmen‐
53       tids  reserved).  Comment  lines contain a "#" in the first column. The
54       file should not contain blank or empty lines. Segment IDs reserved  for
55       the  system  are  defined in the </usr/include/rsm/rsm_common.h> header
56       and cannot be used by the applications.
57

RETURN VALUES

59       Upon successful completion, these functions  return  0.  Otherwise,  an
60       error value is returned to indicate the error.
61

ERRORS

63       The rsm_get_segmentid_range() function can return the following errors:
64
65       RSMERR_BAD_ADDR      The address passed is invalid.
66
67
68       RSMERR_BAD_APPID     The appid is not defined in configuration file.
69
70
71       RSMERR_BAD_CONF      The configuration file is not present or not read‐
72                            able, or the configuration file format  is  incor‐
73                            rect.
74
75

ATTRIBUTES

77       See attributes(5) for descriptions of the following attributes:
78
79
80
81
82       ┌─────────────────────────────┬─────────────────────────────┐
83       │ATTRIBUTE TYPE               │ATTRIBUTE VALUE              │
84       ├─────────────────────────────┼─────────────────────────────┤
85       │Interface Stability          │Unstable                     │
86       ├─────────────────────────────┼─────────────────────────────┤
87       │MT-Level                     │MT-Safe                      │
88       └─────────────────────────────┴─────────────────────────────┘
89

SEE ALSO

91       rsm_memseg_export_publish(3RSM), attributes(5)
92
93
94
95SunOS 5.11                        8 May 2003     rsm_get_segmentid_range(3RSM)
Impressum