int rc;
int shmid;
+ if (shared_data)
+ return 0;
+
/* Create new segment */
shmid = shmget(IPC_PRIVATE, sizeof(*shared_data), 0600);
if (shmid == -1) {
argv[0], threads, argv[3], cmdstr);
}
+ rc = shmem_setup();
+ if (rc)
+ return rc;
+
shmem_reset(threads);
sigemptyset(&sigset);
}
#ifdef MAX_THREADS
+ rc = shmem_setup();
+ if (rc)
+ return rc;
+
if (thread) {
shmem_lock();
/* threads interleave */
next_time.tv_sec -= verbose;
ostid_set_seq_echo(&data.ioc_obdo1.o_oi);
+ rc = shmem_setup();
+ if (rc)
+ return rc;
+
for (i = 1, next_count = verbose; i <= count && shmem_running(); i++) {
/*
* base_id is 1 so we don't need to worry about it being
(uintmax_t)objid, ctime(&start.tv_sec));
ostid_set_seq_echo(&data.ioc_obdo1.o_oi);
+ rc = shmem_setup();
+ if (rc)
+ return rc;
+
for (i = 1, next_count = verbose; i <= count && shmem_running(); i++) {
if (objid > OBIF_MAX_OID) {
fprintf(stderr, "errr: %s: invalid objid '%llu'\n",
next_time.tv_sec -= verbose;
ostid_set_seq_echo(&data.ioc_obdo1.o_oi);
+ rc = shmem_setup();
+ if (rc)
+ return rc;
+
for (i = 1, next_count = verbose; i <= count && shmem_running();
i++, id++) {
if (id > OBIF_MAX_OID) {
(uintmax_t)objid, ctime(&start.tv_sec));
ostid_set_seq_echo(&data.ioc_obdo1.o_oi);
+ rc = shmem_setup();
+ if (rc)
+ return rc;
+
for (i = 1, next_count = verbose; i <= count && shmem_running(); i++) {
if (objid > OBIF_MAX_OID) {
fprintf(stderr, "errr: %s: invalid objid '%llu'\n",
stride = len;
#ifdef MAX_THREADS
+ rc = shmem_setup();
+ if (rc)
+ return rc;
+
if (thread) {
shmem_lock();
if (nthr_per_obj != 0) {
int obd_initialize(int argc, char **argv)
{
- if (shmem_setup() != 0)
- return -1;
-
register_ioc_dev(OBD_DEV_ID, OBD_DEV_PATH);
return 0;