FD_OFFSET

31 views
Skip to first unread message

Sergei Sharonov

unread,
Jul 16, 2015, 12:17:47 PM7/16/15
to uf...@googlegroups.com
Suggest moving FD_OFFSET into uffs_config.h
Rationale:
UFFS may not be the only source of FDs in the system. Need some mechanism to reserve FDs for use by other drivers. UFFS already does this for stdio via FD_OFFSET. Moving it into user configurable header will let user increase pool of reserved FDs when needed. 
I also added the following macro to validate it:
#if (1 << FD_SIGNATURE_SHIFT) < (MAX_OBJECT_HANDLE + FD_OFFSET)
#error Not enough shift
#endif
Does this look correct?
Regards,
Sergei
Reply all
Reply to author
Forward
0 new messages