Skip to content

Commit

Permalink
Documentation: teaching: labs: kernel_api: Fix indentation for exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Ghita committed Mar 2, 2020
1 parent 1bc65fc commit 60d97b0
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions Documentation/teaching/labs/kernel_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -686,27 +686,27 @@ free them (in :c:func:`memory_exit`).
:c:type:`struct task_struct` structure, returned by :c:macro:`current`
macro.

.. hint::
Search for :c:type:`pid` in :c:type:`task_struct`.
.. hint::
Search for :c:type:`pid` in :c:type:`task_struct`.

* PID of the parent process of the current process.
* PID of the parent process of the current process.

.. hint::
Search for the relevant field from :c:type:`struct task_struct`
structure. Look after "parent".
.. hint::
Search for the relevant field from :c:type:`struct task_struct`
structure. Look after "parent".

* PID of the next process from the list of processes, relative to the
current process.
* PID of the next process from the list of processes, relative to the
current process.

.. hint::
Use :c:macro:`next_task` macro, which returns a pointer to the next
process (i.e a :c:type:`struct task_struct` structure).
.. hint::
Use :c:macro:`next_task` macro, which returns a pointer to the next
process (i.e a :c:type:`struct task_struct` structure).

* PID of the next process of the next process, relative to the current
process.
* PID of the next process of the next process, relative to the current
process.

.. hint::
Call 2 times the :c:macro:`next_task`.
.. hint::
Call 2 times the :c:macro:`next_task`.

3. (TODO 3) Display the four structures.
* Use :c:func:`printk` to display their two fields:
Expand Down Expand Up @@ -798,9 +798,9 @@ following:
expire. It must not satisfy a part of the expiration condition
from :c:func:`task_info_remove_expired`.

.. hint:: For ``TODO 2``, extract the first element from the list (the one
referred by :c:member:`head.next`) and set the :c:member:`count`
field to a large enough value. Use :c:func:`atomic_set` function.
.. hint:: For ``TODO 2``, extract the first element from the list (the one
referred by :c:member:`head.next`) and set the :c:member:`count`
field to a large enough value. Use :c:func:`atomic_set` function.

3. Compile, copy, load and unload the kernel module following the displayed
messages.
Expand Down

0 comments on commit 60d97b0

Please sign in to comment.