[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fedcc3b0810050624m19bfd701n82b70ca81887c3fc@mail.gmail.com>
Date: Sun, 5 Oct 2008 11:24:19 -0200
From: "Thiago Lacerda" <thiagotbl@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Questions about mmap
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists