Lines Matching full:shmem

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