mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipc 1/3: Add refcount to ipc_rcu_alloc
Date: Sat, 3 Jul 2004 15:44:12 -0700	[thread overview]
Message-ID: <20040703154412.1d03ed41.akpm@osdl.org> (raw)
In-Reply-To: <40E72AB7.50802@colorfullife.com>

Manfred Spraul <manfred@colorfullife.com> wrote:
>
> +struct ipc_rcu_hdr
>  +{
>  +	int refcount;
>  +	int is_vmalloc;
>  +	void *data[0];
>  +};

That's not what I meant ;)

struct ipc_rcu_hdr
{
	int refcount;
	int is_vmalloc;
};

Then place one of these inside struct msg_queue, one inside struct
sem_array, etc.

#define ipc_rcu_putref(p)
	if (--p->rcu_hdr.refcount == 0)
		ipc_rcu_putref_final(p, &p->rcu_hdr)

or whatever.

That's assuming struct kref isn't suitable.  I guess you don't want the
atomic_t.

  reply	other threads:[~2004-07-03 22:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-03 17:35 Manfred Spraul
2004-07-03 20:22 ` Andrew Morton
2004-07-03 21:52   ` Manfred Spraul
2004-07-03 22:44     ` Andrew Morton [this message]
2004-07-03 23:10       ` Manfred Spraul

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=20040703154412.1d03ed41.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /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®