Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2014 18:02:38 -0400 (EDT)
From:      Benjamin Kaduk <bjk@freebsd.org>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        doc@freebsd.org
Subject:   Re: request: help updating TASKQUEUE(9)
Message-ID:  <alpine.GSO.1.10.1405241802100.25244@multics.mit.edu>
In-Reply-To: <CAJ-VmokB28K3wJZm%2Bb21QA-xdCc6Ss95VGpyv8oNJEDUMrZm6Q@mail.gmail.com>
References:  <CAJ-VmokB28K3wJZm%2Bb21QA-xdCc6Ss95VGpyv8oNJEDUMrZm6Q@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sat, 24 May 2014, Adrian Chadd wrote:

> Hi,
>
> I've just added a new call to taskqueue -
> taskqueue_start_threads_pinned(). It's like taskqueue_start_threads(),
> but it takes a cpuid to pin the threads to.
>
> Would someone please help me with the manpage markup and wording?

Something like this?

-Ben
[-- Attachment #2 --]
Index: share/man/man9/taskqueue.9
===================================================================
--- share/man/man9/taskqueue.9	(revision 266330)
+++ share/man/man9/taskqueue.9	(working copy)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 24, 2014
+.Dd May 24, 2014
 .Dt TASKQUEUE 9
 .Os
 .Sh NAME
@@ -68,6 +68,11 @@
 .Fn taskqueue_create_fast "const char *name" "int mflags" "taskqueue_enqueue_fn enqueue" "void *context"
 .Ft int
 .Fn taskqueue_start_threads "struct taskqueue **tqp" "int count" "int pri" "const char *name" "..."
+.Ft int
+.Fo taskqueue_start_threads_pinned
+.Fa "struct taskqueue **tqp" "int count" "int pri" "int cpu_id"
+.Fa "const char *name" "..."
+.Fc
 .Ft void
 .Fn taskqueue_set_callback "struct taskqueue *queue" "enum taskqueue_callback_type cb_type" "taskqueue_callback_fn callback" "void *context"
 .Ft void
@@ -145,7 +150,14 @@
 which the thread servicing the queue will be signaled that it should exit.
 .Pp
 Once a taskqueue has been created, its threads should be started using
-.Fn taskqueue_start_threads .
+.Fn taskqueue_start_threads
+or
+.Fn taskqueue_start_threads_pinned .
+.Fn taskqueue_start_threads_pinned
+takes a
+.Va cpu_id
+argument which will cause the threads which are started for the taskqueue
+to be pinned to run on the given CPU.
 Callbacks may optionally be registered using
 .Fn taskqueue_set_callback .
 Currently, callbacks may be registered for the following purposes:
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1405241802100.25244>