aboutsummaryrefslogtreecommitdiff
path: root/docs/guides
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-09-09 23:02:20 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-09-09 23:02:20 +0200
commitb99b79d8080cc1491f96069677d9ce0b7775a4f0 (patch)
tree1f7a4534926a79ee6376770c63cccd2aa9e37442 /docs/guides
parent9438d08cc7a7f814d8d1b0cb13f4db176fc53aeb (diff)
downloadkernel-b99b79d8080cc1491f96069677d9ce0b7775a4f0.tar.xz
kernel-b99b79d8080cc1491f96069677d9ce0b7775a4f0.zip
chore: replace some naked pointers
The coding guidelines explicitly prohibit the use of "naked"/C-style pointers. However, there were some prominent examples in the kapi and the core kernel source. This changeset replaces them with the appropriate smart pointer types.
Diffstat (limited to 'docs/guides')
-rw-r--r--docs/guides/device-drivers.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/guides/device-drivers.rst b/docs/guides/device-drivers.rst
index 3d3da182..a4bfe433 100644
--- a/docs/guides/device-drivers.rst
+++ b/docs/guides/device-drivers.rst
@@ -143,14 +143,14 @@ TeachOS's simplest real bus, ``kernel::bus::pseudo`` (``kernel/kernel/bus/pseudo
{
explicit pseudo(kstd::string name);
protected:
- auto query_facet(kapi::capabilities::facet_id facet) -> void * override;
+ auto query_facet(kapi::capabilities::facet_id facet) -> kstd::observer_ptr<void> override;
private:
pseudo_signature m_signature{*this};
};
- auto pseudo::query_facet(kapi::capabilities::facet_id facet) -> void *
+ auto pseudo::query_facet(kapi::capabilities::facet_id facet) -> kstd::observer_ptr<void>
{
- if (facet == kernel::bus::pseudo_signature::id) { return &m_signature; }
+ if (facet == kernel::bus::pseudo_signature::id) { return kstd::observer_ptr{&m_signature}; }
return device::query_facet(facet);
}