* [Xenomai-help] Shared memory and fstat()
@ 2010-06-16 20:20 Herrera-Bendezu, Luis
2010-06-16 20:39 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Herrera-Bendezu, Luis @ 2010-06-16 20:20 UTC (permalink / raw)
To: xenomai
Hello,
Can a file descriptor returned from Xenomai POSIX skin
shm_open()/ftruncate() used in fstat()?
Value returned for st_size in the stat structure is
always 0 despite change of size using ftruncate().
Noticed that shared memory object does not have an entry
on /dev/shm as regular POSIX objects. Where is it located?
If entry exists, can it be used to query its size?
Thanks,
Luis
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Shared memory and fstat()
2010-06-16 20:20 [Xenomai-help] Shared memory and fstat() Herrera-Bendezu, Luis
@ 2010-06-16 20:39 ` Gilles Chanteperdrix
2010-06-16 20:47 ` Herrera-Bendezu, Luis
0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2010-06-16 20:39 UTC (permalink / raw)
To: Herrera-Bendezu, Luis; +Cc: xenomai
Herrera-Bendezu, Luis wrote:
> Hello,
>
> Can a file descriptor returned from Xenomai POSIX skin
> shm_open()/ftruncate() used in fstat()?
No.
>
> Value returned for st_size in the stat structure is
> always 0 despite change of size using ftruncate().
>
> Noticed that shared memory object does not have an entry
> on /dev/shm as regular POSIX objects. Where is it located?
> If entry exists, can it be used to query its size?
No, xenomai posix skin shared memory do not exist as filesystem objects,
they will only be listed in /proc/xenomai/heap.
Note, however, that they are only useful for sharing memory between
kernel-space posix applications and user-space posix applications, which
should have become rare these days. If what you are looking for is
simply a way for sharing memory between to user-space real-time
applications, they you can use linux regular shared memories, for which
fstat works.
>
> Thanks,
> Luis
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Shared memory and fstat()
2010-06-16 20:39 ` Gilles Chanteperdrix
@ 2010-06-16 20:47 ` Herrera-Bendezu, Luis
0 siblings, 0 replies; 3+ messages in thread
From: Herrera-Bendezu, Luis @ 2010-06-16 20:47 UTC (permalink / raw)
To: xenomai
Gilles,
>-----Original Message-----
>From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
>Sent: Wednesday, June 16, 2010 4:40 PM
>To: Herrera-Bendezu, Luis
>Cc: xenomai@xenomai.org
>Subject: Re: [Xenomai-help] Shared memory and fstat()
>
>
>Herrera-Bendezu, Luis wrote:
>> Hello,
>>
>> Can a file descriptor returned from Xenomai POSIX skin
>> shm_open()/ftruncate() used in fstat()?
>
>No.
>
>>
>> Value returned for st_size in the stat structure is
>> always 0 despite change of size using ftruncate().
>>
>> Noticed that shared memory object does not have an entry
>> on /dev/shm as regular POSIX objects. Where is it located?
>> If entry exists, can it be used to query its size?
>
>No, xenomai posix skin shared memory do not exist as
>filesystem objects,
>they will only be listed in /proc/xenomai/heap.
>
>Note, however, that they are only useful for sharing memory between
>kernel-space posix applications and user-space posix
>applications, which
>should have become rare these days. If what you are looking for is
>simply a way for sharing memory between to user-space real-time
>applications, they you can use linux regular shared memories, for which
>fstat works.
>
That is precisely what I am looking for.
Thanks,
Luis
>>
>> Thanks,
>> Luis
>>
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
>>
>
>
>--
> Gilles.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-16 20:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16 20:20 [Xenomai-help] Shared memory and fstat() Herrera-Bendezu, Luis
2010-06-16 20:39 ` Gilles Chanteperdrix
2010-06-16 20:47 ` Herrera-Bendezu, Luis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.