Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет LWN.net ([info]syn_lwnheadline)
@ 2018-09-04 00:15:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
[$] IDA: simplifying the complex task of allocating integers
It is common for kernel code to generate unique integers for identifiers.
When one plugs in a flash drive, it will show up as
/dev/sdN; that N (a letter derived from a
number) must be generated in the
kernel, and it should not already be in use for another drive or unpleasant
things will happen. One might think that generating such numbers would not
be a difficult task, but that turns out not to be the case, especially in
situations where many numbers must be tracked. The IDA (for "ID
allocator", perhaps) API exists to handle this specialized task. In past
kernels, it has managed to make the process of getting an unused number
surprisingly
complex; the 4.19 kernel has a new IDA API that simplifies things
considerably.


(Читать комментарии) (Добавить комментарий)