Merge pull request #15287 from donaldsharp/rcu_doc

doc: Add some documentation around a new pthread call
This commit is contained in:
Donatas Abraitis 2024-02-06 12:57:32 +02:00 committed by GitHub
commit 969b2d420c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -232,6 +232,15 @@ Internals
that case, either all of the library's threads must be registered for RCU,
or the code must instead pass a (non-RCU) copy of the data to the library.
.. c:function:: int frr_pthread_non_controlled_startup(pthread_t thread, const char *name, const char *os_name)
If a pthread is started outside the control of normal pthreads in frr
then frr_pthread_non_controlled_startup should be called. This will
properly setup both the pthread with rcu usage as well as some data
structures pertaining to the name of the pthread. This is especially
important if the pthread created ends up calling back into FRR and
one of the various zlog_XXX functions is called.
.. c:function:: void rcu_shutdown(void)
Stop the RCU sweeper thread and make sure all cleanup has finished.