-
Pavel Emelyanov authored
Current fdsets are ugly, limited (bitmask will exhaust in several months) and suffer from unknown problems with fdsets reuse :( With new approach (this set) the images management is simple. The basic function is open_image, which gives you an fd for an image. If you want to pre-open several images at once instead of calling open_image every single time, you can use the new fdsets. Images CR_FD_ descriptors should be grouped like _CR_FD_FOO_FROM, CR_FD_FOO_ITEM1, CR_FD_FOO_ITEM2, .. CR_FD_FOO_ITEMN, _CR_FD_FOO_TO, After this you can call cr_fd_open() specifying ranges -- _FROM and _TO macros, it will give you an cr_fdset object. Then the fdset_fd(set, type) will give you the descriptor of the open "set" group corresponding to the "type" type. 3 groups are introduced in this set -- tasks, ns and global. That's it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
1fb1d941