1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix undefined reference caused by inlined function

This commit is contained in:
Steffen Vogel 2017-06-17 03:15:35 +02:00
parent 3f1bbac4e9
commit 2ca0cdf979
2 changed files with 9 additions and 7 deletions

View file

@ -119,18 +119,15 @@ int shmem_int_read(struct shmem_int *shm, struct sample *smps[], unsigned cnt);
*/
int shmem_int_write(struct shmem_int *shm, struct sample *smps[], unsigned cnt);
/** Allocate samples to be written to the interface. The writing process must
/** Allocate samples to be written to the interface.
*
* not free the samples; only the receiving process should free them using
* sample_put after use.
* The writing process must not free the samples; only the receiving process should free them using sample_put after use.
* @param shm The shared memory interface.
* @param smps Array where pointers to newly allocated samples will be returned.
* @param cnt Number of samples to allocate.
* @returns Number of samples that were successfully allocated (may be less then cnt).
* @return Number of samples that were successfully allocated (may be less then cnt).
*/
inline int shmem_int_alloc(struct shmem_int *shm, struct sample *smps[], unsigned cnt) {
return sample_alloc(&shm->write.shared->pool, smps, cnt);
}
int shmem_int_alloc(struct shmem_int *shm, struct sample *smps[], unsigned cnt);
/** Returns the total size of the shared memory region with the given size of
* the input/output queues (in elements) and the given number of data elements

View file

@ -169,3 +169,8 @@ int shmem_int_write(struct shmem_int *shm, struct sample *smps[], unsigned cnt)
return shm->write.shared->polling ? queue_push_many(&shm->write.shared->queue.q, (void **) smps, cnt)
: queue_signalled_push_many(&shm->write.shared->queue.qs, (void **) smps, cnt);
}
int shmem_int_alloc(struct shmem_int *shm, struct sample *smps[], unsigned cnt)
{
return sample_alloc(&shm->write.shared->pool, smps, cnt);
}