Lines Matching full:shmem

288 	u_char	*shmem;  member
438 int shmem; member
746 * Before starting ONCORE, lets setup SHMEM in oncore_start()
747 * This will include merging an old SHMEM into the new one if in oncore_start()
946 * shmem (so we won't lose our almanac if we need it). in oncore_init_shmem()
952 oncore_log(instance, LOG_WARNING, "ONCORE: Can't open SHMEM file"); in oncore_init_shmem()
960 "ONCORE: truncated/failed read of SHMEM file"); in oncore_init_shmem()
965 /* OK, we now create the NEW SHMEM. */ in oncore_init_shmem()
968 oncore_log(instance, LOG_WARNING, "ONCORE: Can't open shmem"); in oncore_init_shmem()
979 mp->shmem = n; in oncore_init_shmem()
1004 /* next build the new SHMEM buffer in memory */ in oncore_init_shmem()
1007 l = mp->shmem; in oncore_init_shmem()
1032 /* we now walk thru the two buffers (shmem_old and buf, soon to become shmem) in oncore_init_shmem()
1056 oncore_log(instance, LOG_ERR, "ONCORE: error writing shmem"); in oncore_init_shmem()
1061 instance->shmem = (u_char *) mmap(0, shmem_length, in oncore_init_shmem()
1068 if (instance->shmem == (u_char *)MAP_FAILED) { in oncore_init_shmem()
1069 instance->shmem = 0; in oncore_init_shmem()
1075 "SHMEM (size = %ld) is CONFIGURED and available as %s", in oncore_init_shmem()
1176 * First, to enable the option there must be a SHMEM line with a file name. in oncore_read_config()
1281 if (!strncmp(cc, "STATUS", (size_t) 6) || !strncmp(cc, "SHMEM", (size_t) 5)) { in oncore_read_config()
1545 if (instance->shmem != NULL) { in oncore_consume()
1546 instance->shmem[oncore_messages[m].shmem + 2]++; in oncore_consume()
1547 memcpy(instance->shmem + oncore_messages[m].shmem + 3, in oncore_consume()
1606 * times we get here in 0D mode (the 1/15 is in 3D for SHMEM). in oncore_get_timestamp()
2346 /* copy the record to the (extra) location in SHMEM */ in oncore_get_timestamp()
2348 if (instance->shmem) { in oncore_get_timestamp()
2353 case 6: smp = &instance->shmem[instance->shmem_Ba]; break; in oncore_get_timestamp()
2354 case 8: smp = &instance->shmem[instance->shmem_Ea]; break; in oncore_get_timestamp()
2355 case 12: smp = &instance->shmem[instance->shmem_Ha]; break; in oncore_get_timestamp()
2437 * if SHMEM active, every 15s, steal one 'tick' to get 2D or 3D posn. in oncore_get_timestamp()
2440 …if (instance->shmem && !instance->shmem_bad_Ea && instance->shmem_Posn && (instance->site_survey =… in oncore_get_timestamp()
2762 * Demultiplex the almanac into shmem in oncore_get_timestamp()
2774 if (instance->shmem == NULL) in oncore_get_timestamp()
2791 instance->shmem[instance->shmem_Cb + i + 2]++; in oncore_get_timestamp()
2792 memcpy(instance->shmem + instance->shmem_Cb + i + 3, buf, (size_t) (len + 3)); in oncore_get_timestamp()
2970 /* use MODEL to set CHAN and TRAIM and possibly zero SHMEM */ in oncore_get_timestamp()
3022 * go from 3D -> 0D. We do this to get a @@Ea message for SHMEM. in oncore_get_timestamp()
3023 * For NOW we will turn this aspect of filling SHMEM off for the M12 in oncore_get_timestamp()
3029 "*** SHMEM partially enabled for ONCORE M12 s/w v%d.%d ***", in oncore_get_timestamp()
3034 oncore_sendmsg(instance, oncore_cmd_Bb, sizeof(oncore_cmd_Bb)); /* turn on for shmem (6/8/12) */ in oncore_get_timestamp()
3038 …oncore_sendmsg(instance, oncore_cmd_Be, sizeof(oncore_cmd_Be)); /* Tell us the Almanac for shmem (… in oncore_get_timestamp()
3520 * try loading Almanac from shmem (where it was copied from shmem_old
3533 if (!instance->shmem) in oncore_load_almanac()
3537 for (cp = instance->shmem + 4; (n = 256 * (*(cp-3)) + *(cp-2)); in oncore_load_almanac()
3548 for (cp = instance->shmem + 4; (n = 256 * (*(cp-3)) + *(cp-2)); in oncore_load_almanac()
3569 if (!instance->posn_set) { /* if we input a posn use it, else from SHMEM */ in oncore_load_almanac()
3570 oncore_log(instance, LOG_NOTICE, "Loading Posn from SHMEM"); in oncore_load_almanac()
3571 for (cp=instance->shmem+4; (n = 256*(*(cp-3)) + *(cp-2)); cp+=(n+3)) { in oncore_load_almanac()
3583 "SHMEM posn = %ld (%d, %d, %d)", in oncore_load_almanac()
3584 (long)(cp-instance->shmem), in oncore_load_almanac()
3889 * if SHMEM active, every 15s, steal one 'tick' to get 2D or 3D posn.
4018 * Check if we have a SHMEM, and if so try to load whatever is there. in oncore_wait_almanac()