Lines Matching refs:next
21 PetscShmgetAllocation next; member
50 PetscShmgetAllocation next = allocations, previous = NULL; in PetscShmgetAddressesFinalize() local
52 while (next) { in PetscShmgetAddressesFinalize()
53 …next->shmid, IPC_RMID, NULL), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to free shared memory key %d… in PetscShmgetAddressesFinalize()
54 previous = next; in PetscShmgetAddressesFinalize()
55 next = next->next; in PetscShmgetAddressesFinalize()
115 allocation = allocation->next; in PetscShmgetMapAddresses()
131 PetscShmgetAllocation next = allocations, previous = NULL; in PetscShmgetMapAddresses() local
135 while (next) { in PetscShmgetMapAddresses()
136 if (next->shmkey == shmkey) addres[i] = next->addr; in PetscShmgetMapAddresses()
137 previous = next; in PetscShmgetMapAddresses()
138 next = next->next; in PetscShmgetMapAddresses()
140 if (!next) { in PetscShmgetMapAddresses()
150 if (previous) previous->next = allocation; in PetscShmgetMapAddresses()
179 PetscShmgetAllocation next = allocations, previous = NULL; in PetscShmgetUnmapAddresses() local
182 while (next) { in PetscShmgetUnmapAddresses()
183 if (next->addr == addres[i]) { in PetscShmgetUnmapAddresses()
184 …PetscCheck(!shmdt(next->addr), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to shmdt() location %s, see… in PetscShmgetUnmapAddresses()
185 if (previous) previous->next = next->next; in PetscShmgetUnmapAddresses()
186 else allocations = next->next; in PetscShmgetUnmapAddresses()
187 PetscCall(PetscFree(next)); in PetscShmgetUnmapAddresses()
191 previous = next; in PetscShmgetUnmapAddresses()
192 next = next->next; in PetscShmgetUnmapAddresses()
295 PetscShmgetAllocation next = allocations; in PetscShmgetAllocateArray() local
296 while (next->next) next = next->next; in PetscShmgetAllocateArray()
297 next->next = allocation; in PetscShmgetAllocateArray()
331 PetscShmgetAllocation next = allocations, previous = NULL; in PetscShmgetDeallocateArray() local
333 while (next) { in PetscShmgetDeallocateArray()
334 if (next->addr == *addr) { in PetscShmgetDeallocateArray()
335 …MPI Server array %p shmkey %d shmid %d size %d\n", *addr, next->shmkey, next->shmid, (int)next->sz… in PetscShmgetDeallocateArray()
336 …PetscCheck(!shmdt(next->addr), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to shmdt() location %s, see… in PetscShmgetDeallocateArray()
337 …next->shmid, IPC_RMID, NULL), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to free shared memory addr %… in PetscShmgetDeallocateArray()
339 if (previous) previous->next = next->next; in PetscShmgetDeallocateArray()
340 else allocations = next->next; in PetscShmgetDeallocateArray()
341 PetscCall(PetscFree(next)); in PetscShmgetDeallocateArray()
344 previous = next; in PetscShmgetDeallocateArray()
345 next = next->next; in PetscShmgetDeallocateArray()