OpenCloudOS-Kernel/Documentation/core-api
Arnd Bergmann 0e3fd810c4 Documentation: document ktime_get_*() APIs
As Dave Chinner points out, we don't have a proper documentation for the
ktime_get() family of interfaces, making it rather unclear which of the
over 30 (!) interfaces one should actually use in a driver or elsewhere
in the kernel.

I wrote up an explanation from how I personally see the interfaces,
documenting what each of the functions do and hopefully making it a bit
clearer which should be used where.

This is the first time I tried writing .rst format documentation, so
in addition to any mistakes in the content, I probably also introduce
nonstandard formatting ;-)

I first tried to add an extra section to
Documentation/timers/timekeeping.txt, but this is currently not included
in the generated API, and it seems useful to have the API docs as part
of what gets generated in
https://www.kernel.org/doc/html/latest/core-api/index.html#core-utilities
instead, so I started a new file there.

I also considered adding the documentation inline in the
include/linux/timekeeping.h header, but couldn't figure out how to do
that in a way that would result both in helpful inline comments as
well as readable html output, so I settled for the latter, with
a small note pointing to it from the header.

Cc: Dave Chinner <david@fromorbit.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-07-23 09:16:56 -06:00
..
assoc_array.rst core-api: remove an unexpected unident 2017-05-18 10:22:34 -06:00
atomic_ops.rst locking/Documentation: Use `warning` RST directive 2018-05-15 08:11:15 +02:00
cachetlb.rst docs: core-api: add cachetlb documentation 2018-05-08 10:02:34 -06:00
circular-buffers.rst docs: core-api: add circular-buffers documentation 2018-05-08 10:07:06 -06:00
conf.py docs: Add more manuals to the PDF build 2016-11-16 16:07:02 -07:00
cpu_hotplug.rst Documentation: Update CPU hotplug and move it to core-api 2017-01-13 10:32:32 -07:00
debug-objects.rst doc: debugobjects: actually pull in the kerneldoc comments 2016-11-29 14:44:14 -07:00
errseq.rst errseq: Add to documentation tree 2018-01-01 12:40:27 -07:00
flexible-arrays.rst Documentation: Add flexible-arrays.rst to the documentation tree 2017-03-29 14:50:21 -06:00
genalloc.rst doc: Add documentation for the genalloc subsystem 2017-08-30 16:49:04 -06:00
genericirq.rst genericirq.rst: Remove :c:func:`...` in code blocks 2017-12-02 08:41:46 -07:00
gfp_mask-from-fs-io.rst docs: Use the kerneldoc comments for memalloc_no*() 2018-05-29 06:45:55 -06:00
idr.rst docs/idr: use empty "functions" directive 2018-06-30 07:52:50 -06:00
index.rst Documentation: document ktime_get_*() APIs 2018-07-23 09:16:56 -06:00
kernel-api.rst Fix Documentation build due to rename of main.c to mtrr.c 2018-06-18 13:41:45 +09:00
librs.rst docs-rst: convert librs book to ReST 2017-05-16 08:44:16 -03:00
local_ops.rst timer: Remove init_timer() interface 2017-11-21 15:57:09 -08:00
printk-formats.rst lib/vsprintf: Remove atomic-unsafe support for %pCr 2018-06-05 09:43:39 +02:00
refcount-vs-atomic.rst Documentation: refcount-vs-atomic: Update reference to LKMM doc. 2018-05-08 14:52:39 -06:00
timekeeping.rst Documentation: document ktime_get_*() APIs 2018-07-23 09:16:56 -06:00
tracepoint.rst doc: Sphinxify the tracepoint docbook 2016-11-29 14:44:23 -07:00
workqueue.rst Documentation: core-api: minor workqueue.rst cleanups 2017-09-18 17:29:27 -07:00