From a5b7349ab99b395d24d2e693ef3de6f0f7c79027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Mon, 16 Sep 2024 16:28:19 +0200 Subject: [PATCH] samples: doc: convert philosophers sample to code-sample directive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adopt zephyr:code-sample directive to describe the Dining Philosophers sample and update reference accordingly. Signed-off-by: Benjamin Cabé --- samples/boards/arc_secure_services/README.rst | 2 +- samples/philosophers/README.rst | 7 ++++--- samples/posix/philosophers/README.rst | 5 ++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/boards/arc_secure_services/README.rst b/samples/boards/arc_secure_services/README.rst index 817af34e975..e63a9b9e910 100644 --- a/samples/boards/arc_secure_services/README.rst +++ b/samples/boards/arc_secure_services/README.rst @@ -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:: diff --git a/samples/philosophers/README.rst b/samples/philosophers/README.rst index d0701832cbe..8ff1ea33e9a 100644 --- a/samples/philosophers/README.rst +++ b/samples/philosophers/README.rst @@ -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 ******** diff --git a/samples/posix/philosophers/README.rst b/samples/posix/philosophers/README.rst index 604fb8858dd..6cd73ee637f 100644 --- a/samples/posix/philosophers/README.rst +++ b/samples/posix/philosophers/README.rst @@ -6,7 +6,7 @@ Overview ******** -This sample implements Zephyr's :ref:`Dining Philosophers Sample ` using the +This sample implements Zephyr's :zephyr:code-sample:`dining-philosophers` sample using the :ref:`POSIX API `. The source code for this sample can be found under :file:`samples/posix/philosophers`. @@ -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 `. +For additional information, please refer to the :zephyr:code-sample:`dining-philosophers` sample.