Re: Is there any way to get the size of fifo at the current time?
Der Herr Hofrat <[email protected]>
| Newsgroups | gmane.linux.real-time.rtlinux.general |
|---|---|
| Message-ID | <[email protected]> |
> > I wanna know what size of fifo is being used at the > current time.. (not allocated size when a fifo was > created) > As of pre3/rc1 a number of fifo management macros were moved to include/rtl_fifo.h, you can use these to check the fifo status RTF_FREE(fifo_number) RTF_FULL(fifo_number) RTF_EMBPTY(fifo_number) ... note though that this would make your code quite non-portable - so if you need this information for debugging its ok - but I would not base the actual application on these macros. > and I have one more question. > What's a difference using write and rtf_put in > realtime process..? write is posix API rtf_put is a home-brew API (the RTLinux V1 API) Actually write is a wrapper to rtf_put so technically they are the same but rtf_put is obviously again non-portable so there is more or less no reason to use it any more. hofrat _______________________________________________ Rtl mailing list [email protected] http://www2.fsmlabs.com/mailman/listinfo/rtl