comp.lang.ada
 help / color / mirror / Atom feed
From: Francesco PIRANEO GIULIANO <liste.fpiraneo@gmail.com>
Subject: Re: Does mmap gives a right result?!
Date: Sun, 3 Oct 2010 12:22:58 -0700 (PDT)
Date: 2010-10-03T12:22:58-07:00	[thread overview]
Message-ID: <deb48648-d855-46d1-bf79-6128270942e9@h7g2000yqn.googlegroups.com> (raw)
In-Reply-To: d7143f9a-f41f-4876-9f04-16f2deb0d4ae@k10g2000yqa.googlegroups.com

Bjorn,
Jeff,

Thank you for your answer.

I'm going to download and try GNAT component collection; before this
Jeff I think you have reason:

The original C code looks like:
fbuffer = mmap(NULL, fix.smem_len, PROT_READ | PROT_WRITE, MAP_FILE |
MAP_SHARED, fb_fd, 0);

and I translated it into:
fbindex := mmap(0, fbhandler.fixinfo.smem_len, fbhandler.PROT_READ +
fbhandler.PROT_WRITE, fbhandler.MAP_FILE + fbhandler.MAP_SHARED, fbid,
0);

...not the same! :-) Maybe if I'll try to change the "0" to "NULL" it
will works... maybe!

There is an equivalence of the C's NULL in Ada?

Thank you again.
Francesco



  reply	other threads:[~2010-10-03 19:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-03 11:27 Does mmap gives a right result?! Francesco PIRANEO GIULIANO
2010-10-03 17:04 ` Jeffrey Carter
2010-10-03 17:49 ` Björn
2010-10-03 19:22   ` Francesco PIRANEO GIULIANO [this message]
2010-10-03 19:32     ` Shark8
2010-10-11  3:03       ` David Thompson
2010-10-04  8:05 ` Ludovic Brenta
2010-10-04 21:11   ` Francesco PIRANEO GIULIANO
2010-10-04  9:06 ` Jacob Sparre Andersen
2010-10-04 21:08   ` Francesco PIRANEO GIULIANO
2010-10-05  8:19     ` Ludovic Brenta
2010-10-05 13:17     ` Jacob Sparre Andersen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox