From: "Thiago Lacerda" <thiagotbl@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Questions about mmap
Date: Sun, 5 Oct 2008 11:24:19 -0200 [thread overview]
Message-ID: <3fedcc3b0810050624m19bfd701n82b70ca81887c3fc@mail.gmail.com> (raw)
In-Reply-To: <3fedcc3b0810050621y3f44417ag605ee75dd0389100@mail.gmail.com>
Hi everyone,
I'd like to share a hashtable among kernel and userspace.
The hashtable resolves collision by chaining.
I have the following structure:
typedef struct flow_t flow_t;
struct flow_t {
...
...
flow_t *next;
flow_t *prev;
};
typedef struct hashtable {
flow_t *hashBuckets[X]; // X is a natural number
unsigned int size;
} Hastable;
So, my question is: Can I mmap the hashtable struct and access
directly from userspace? I'm afraid that this could turn on mess
because of the array of pointers.
If it's possible, does anyone know a piece of code that can match my
problem? I've been googling and I just find codes dealing with structs
itself, not pointers.
Best regards
--
Thiago de Barros Lacerda
Computer Science Undergraduate Student - CIn/UFPE - 2004.2
Researcher/Software Developer - GPRT - Networking and
Telecommunications Research Group
next parent reply other threads:[~2008-10-05 13:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3fedcc3b0810050621y3f44417ag605ee75dd0389100@mail.gmail.com>
2008-10-05 13:24 ` Thiago Lacerda [this message]
2008-10-05 14:01 ` Stefan Richter
[not found] ` <3fedcc3b0810070638u60681b6do8a7e94c4919f4a40@mail.gmail.com>
2008-10-07 13:40 ` Thiago Lacerda
2008-10-07 16:02 ` Nick Piggin
2008-10-07 16:06 ` Stefan Richter
2008-10-07 17:09 ` Thiago Lacerda
2008-10-08 4:45 ` Nick Piggin
2008-10-07 20:43 ` linux-os (Dick Johnson)
2008-10-07 20:56 ` Chris Friesen
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=3fedcc3b0810050624m19bfd701n82b70ca81887c3fc@mail.gmail.com \
--to=thiagotbl@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®