All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: jim.cromie@gmail.com
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: opaque "pointer" API, model, best practice ?
Date: Wed, 14 Oct 2020 17:21:50 +0200	[thread overview]
Message-ID: <20201014152150.GA3764480@kroah.com> (raw)
In-Reply-To: <CAJfuBxwzG=xY_51m8mSR0i8t4PT9wcPZ6R=0MFDsDESEQTA5Bw@mail.gmail.com>

On Wed, Oct 14, 2020 at 09:09:11AM -0600, jim.cromie@gmail.com wrote:
> hi all,
> 
> is there an api / usage model / or best practice
> for opaque "handles" ?

"it depends" :)

What are you wanting to do exactly?

> Im aware of 1 case:
> the handle returned by zs_malloc
> I have tried to use it, and have run into locking conflicts
> when trying to keep the memory zs_mapped
> longer than the duration of a function.
> OTOH, if I map and unmap within the function, things work,
> but this is unacceptable overhead.
> 
> so I figure I should read some good code,
> rather than keep hacking at bad code.

Again, what are you trying to do?

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-10-14 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 15:09 opaque "pointer" API, model, best practice ? jim.cromie
2020-10-14 15:21 ` Greg KH [this message]
2020-10-14 15:45   ` jim.cromie

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=20201014152150.GA3764480@kroah.com \
    --to=greg@kroah.com \
    --cc=jim.cromie@gmail.com \
    --cc=kernelnewbies@kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.