tools/unittests/kdoc-test.yaml

Source file repositories/reference/linux-study-clean/tools/unittests/kdoc-test.yaml

File Facts

System
Linux kernel
Corpus path
tools/unittests/kdoc-test.yaml
Extension
.yaml
Size
52252 bytes
Lines
1699
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct kcov {
            /**
             * @refcount: Reference counter. We keep one for:
             *  - opened file descriptor
             *  - task with enabled coverage (we can't unwire it from another task)
             *  - each code section for remote coverage collection
             */
            refcount_t              refcount;
            /**
             * @lock: The lock protects mode, size, area and t.
             */
            spinlock_t              lock;
            /**
             * @mode: the kcov_mode
             */
            enum kcov_mode          mode __guarded_by(&lock);
            /**
             * @size: Size of arena (in long's).
             */
            unsigned int            size __guarded_by(&lock);
            /**
             * @area: Coverage buffer shared with user space.
             */
            void                    *area __guarded_by(&lock);
            /**
             * @t: Task for which we collect coverage, or NULL.
             */
            struct task_struct      *t __guarded_by(&lock);
            /**
             * @remote: Collecting coverage from remote (background) threads.
             */
            bool                    remote;
            /**
             * @remote_size: Size of remote area (in long's).
             */
            unsigned int            remote_size;
            /**
             * @sequence: Sequence is incremented each time kcov is reenabled,
             * used by kcov_remote_stop(), see the comment there.
             */
            int                     sequence;
    };
  expected:
  - man: |
      .TH "struct kcov" 9 "February 2026"  "mock_tests" "Kernel API Manual"
      .SH NAME
      struct kcov \- kcov descriptor (one per opened debugfs file). State transitions of the descriptor:
      .SH SYNOPSIS
      struct kcov {
      .br
      .BI "    refcount_t refcount;"
      .br
      .BI "    spinlock_t lock;"
      .br
      .BI "    enum kcov_mode          mode;"
      .br
      .BI "    unsigned int            size;"
      .br
      .BI "    void *area;"
      .br
      .BI "    struct task_struct      *t;"
      .br
      .BI "    bool remote;"
      .br
      .BI "    unsigned int            remote_size;"
      .br
      .BI "    int sequence;"
      .br
      .BI "
      };

Annotation

Implementation Notes