Справочник по исходному коду ядра KolibriOS

Internal structure and you change requests/suggestions
  • Documentation is vital for KolibriOS development and your effort is very appreciated.

    Some thoughts on this:
    1. There is no reason to keep description of a function in a separate file from its body.
    2. Same for more high-level logic. CleverMouse set a quite high standard of documentation that I see no reason to not follow (except lazyness of course).
    3. May be it's time to proceed with discussion of in-code documentation?
  • dunkaist wrote:Documentation is vital for KolibriOS development and your effort is very appreciated.

    Some thoughts on this:
    1. There is no reason to keep description of a function in a separate file from its body.
    2. Same for more high-level logic. CleverMouse set a quite high standard of documentation that I see no reason to not follow (except lazyness of course).
    3. May be it's time to proceed with discussion of in-code documentation?
    1) I think it is convenient to have descriptions of all function in one place along with the comments in code. For example to overview the kernel structure its quite easier to learn documentation in one file (maybe with internal hyperlinks), than open many many tabs in text editor. Also, maybe Ill add more detailed explanations on how does some things in the kernel work, so document above can become rather a book than only documentation.
    2) You mean http://wiki.kolibrios.org/wiki/Style/ru ? Yes, we need to translate existing russian comments in the kernel and add missing, following one standart.
    3) Yes it is good idea to add possibility to automatically make documentation files from in-code comments. Writing python script that grabs function decriptions from source code file, using regexps, would be not bad and simple solution..
    The best way to predict the future is to create it.
  • Here is the 0.0.2 version, ive added descriptions on some things and how they work. Now still only in russian, but in future I'll translate it in english too.
    Attachments
    Downloaded 296 times
    The best way to predict the future is to create it.
  • Перенес из txt в новую страницу на Wiki: http://wiki.kolibrios.org/wiki/Kernel_code/ru . В начале страницы располагается автоматическое иерархическое оглавление, что дает большое удобство навигации. В дальнейшем справочник будет развиваться и дополняться именно на данной странице.
    The best way to predict the future is to create it.
  • Гм, имхо легче искать информацию в исходном асм-листинге,
    чем ползать по одной плоской вики-странице.

    Надо добавить граф/таблицу перекрёстных ссылок,
    иначе не поймёшь где конкретная функция используется
    и для чего она вообще в ядре нужна.
  • art_zh wrote:Гм, имхо легче искать информацию в исходном асм-листинге,
    чем ползать по одной плоской вики-странице.
    В идеале, конечно, неплохо бы сделать на Doxygen или аналогах. Хотя, мне кажется что и у вики-версии есть свои плюсы: в описании функции можно написать свои пространные рассуждения о том, как и что там работает, и даже привести примеры использования. Не думаю, что в коде уместно писать настолько много и подробно..
    art_zh wrote:Надо добавить граф/таблицу перекрёстных ссылок,
    иначе не поймёшь где конкретная функция используется
    и для чего она вообще в ядре нужна.
    Помню dunkaist генерировал граф инклудов в ядре. Сделать то же самое для функций было бы классно (кстати граф выйдет гигантским :) )
    Таблицу перекрестных ссылок сделать попроще, думаю добавлю. То есть в конце описания каждой функции будет "Используется в :" и набор ссылок.
    The best way to predict the future is to create it.
  • Файл unpacker.inc
    Это lzma-распаковщик, содержит одну единственную функцию void unpack(void* packed_data, void* unpacked_data);
    TODO: вопрос - как задается для данных которые нужно распаковать? т.е как эта функция определяет длину packed_data?
    как эта функция определяет длину packed_data я не знаю, но сюда можно добавить:

    Code: Select all

    dword[packed_data + 0] -> символы 'KPCK'
    dword[packed_data + 4] -> размер unpacked_data
  • IgorA wrote:но сюда можно добавить:

    Code: Select all

    dword[packed_data + 0] -> символы 'KPCK'
    dword[packed_data + 4] -> размер unpacked_data
    Спасибо, добавил
    The best way to predict the future is to create it.
  • А вообще есть такая вики, где рассказывается подробно понятным языком, как ОС грузится, раскладывается по оперативке и т.п.?
  • eurol wrote:А вообще есть такая вики, где рассказывается подробно понятным языком, как ОС грузится, раскладывается по оперативке и т.п.?
    https://wiki.osdev.org
  • Вообще-то вопрос был про Колибри. :)
  • eurol wrote:Вообще-то вопрос был про Колибри. :)

    http://wiki.kolibrios.org/wiki/Kernel/ru
  • Who is online

    Users browsing this forum: No registered users and 2 guests