samples: doc: convert philosophers sample to code-sample directive

Adopt zephyr:code-sample directive to describe the Dining
Philosophers sample and update reference accordingly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2024-09-16 16:28:19 +02:00 committed by Carles Cufí
parent ac1cc17ae9
commit a5b7349ab9
3 changed files with 7 additions and 7 deletions

View File

@ -68,7 +68,7 @@ Currently, in normal application, MPU is not accessible, so no user space and
mpu-based stack checking. Please copy the specific dts file and def_config mpu-based stack checking. Please copy the specific dts file and def_config
file to the specific board dir to build normal application. file to the specific board dir to build normal application.
Here,take :ref:`dining-philosophers-sample` as an example for normal Here,take :zephyr:code-sample:`dining-philosophers` as an example for normal
application. application.
.. zephyr-app-commands:: .. zephyr-app-commands::

View File

@ -1,7 +1,8 @@
.. _dining-philosophers-sample: .. zephyr:code-sample:: dining-philosophers
:name: Dining Philosophers
:relevant-api: semaphore_apis mutex_apis stack_apis thread_apis fifo_apis lifo_apis
Dining Philosophers Implement a solution to the Dining Philosophers problem using Zephyr kernel services.
###################
Overview Overview
******** ********

View File

@ -6,7 +6,7 @@
Overview Overview
******** ********
This sample implements Zephyr's :ref:`Dining Philosophers Sample <dining-philosophers-sample>` using the This sample implements Zephyr's :zephyr:code-sample:`dining-philosophers` sample using the
:ref:`POSIX API <posix_support>`. The source code for this sample can be found under :ref:`POSIX API <posix_support>`. The source code for this sample can be found under
:file:`samples/posix/philosophers`. :file:`samples/posix/philosophers`.
@ -52,5 +52,4 @@ Like the original philosophers sample, the POSIX variant also enables
Additional Information Additional Information
********************** **********************
For additional information, please refer to the For additional information, please refer to the :zephyr:code-sample:`dining-philosophers` sample.
:ref:`Dining Philosophers Sample <dining-philosophers-sample>`.