mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Jerome Arbez-Gindre <jeromearbezgindre@gmail.com>
Cc: linux-kernel@vger.kernel.org, deweerdt@free.fr
Subject: Re: New IDX in linux/connector.h ?
Date: Wed, 23 Jul 2008 16:53:07 +0400	[thread overview]
Message-ID: <20080723125307.GA12017@2ka.mipt.ru> (raw)
In-Reply-To: <a1d7a2f20807230540l4aa7e3f5i1511a2ea71fed8a9@mail.gmail.com>

Hi Jerome.

On Wed, Jul 23, 2008 at 02:40:29PM +0200, Jerome Arbez-Gindre (jeromearbezgindre@gmail.com) wrote:
> Would it be possible to declare in linux/connector.h an IDX for the
> BB, without any restriction on the VAL the BB could use?

Sure. 
VAL (which is 'value' of course) is a private 'offset' inside given
index (IDX), so when you register single IDX all corresponding VALs
belong to the same user.

And some side notes.

I even wanted to have private indexes, i.e. those which are supposed to
be used by out-of-the-tree code, and no in-kernel users would ever touch
this numbers.

You actually can use your own private numbers as long they do not
correspond to currently loaded callbacks. Number of users in the header
is actually a hint, it does not play any role at all as long as number
of users is smaller than 32 (kernel stack allocates this bitmask by
default even if number of users/sockets is smaller).

There is also connector's itself own index (-1), used for requesting a
notifications about new connector users registrations, it can be
simply enough extended to provide dynamic index assignment.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-07-23 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 12:40 Jerome Arbez-Gindre
2008-07-23 12:53 ` Evgeniy Polyakov [this message]
2008-07-23 13:45   ` Jerome Arbez-Gindre
2008-07-23 14:04     ` Evgeniy Polyakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080723125307.GA12017@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=deweerdt@free.fr \
    --cc=jeromearbezgindre@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®