Skip to content

Commit

Permalink
samples: doc: convert philosophers sample to code-sample directive
Browse files Browse the repository at this point in the history
Adopt zephyr:code-sample directive to describe the Dining
Philosophers sample and update reference accordingly.

Signed-off-by: Benjamin Cabé <[email protected]>
  • Loading branch information
kartben authored and carlescufi committed Sep 23, 2024
1 parent ac1cc17 commit a5b7349
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion samples/boards/arc_secure_services/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.

.. zephyr-app-commands::
Expand Down
7 changes: 4 additions & 3 deletions samples/philosophers/README.rst
Original file line number Diff line number Diff line change
@@ -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
********
Expand Down
5 changes: 2 additions & 3 deletions samples/posix/philosophers/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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
:file:`samples/posix/philosophers`.

Expand Down Expand Up @@ -52,5 +52,4 @@ Like the original philosophers sample, the POSIX variant also enables
Additional Information
**********************

For additional information, please refer to the
:ref:`Dining Philosophers Sample <dining-philosophers-sample>`.
For additional information, please refer to the :zephyr:code-sample:`dining-philosophers` sample.

0 comments on commit a5b7349

Please sign in to comment.