That line is a function prototype, as Josh pointed out below.
The code that came in hw10.txt did actually end up being useful, but at least for me, the hardest part of the problem was understanding how and why the hint code is helpful.
----- Forwarded Message -----
From: "Joshua Kerns" <jke...@mail.utexas.edu>
To: "Matt Miller" <mdm...@cs.utexas.edu>
Sent: Tuesday, November 24, 2009 4:23:29 PM GMT -06:00 US/Canada Central
Subject: Re: CS352 Homework 10 / General Question
I haven't started the homework yet, but that is indeed a function prototype. However, the return type isn't void, it's "void *", a void pointer. That's C-parlance for a pointer to memory of unspecified type.
On Nov 24, 2009, at 4:20 PM, Matt Miller wrote:
>
> Has anyone figure out what this line is for? i.e., what purpose does it serve in the code for actually solving this problem, if any?
>
> void *mmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);
>
> It looks like a function prototype, but it returns void, which only adds to my confusion.
>
> This problem is frustrating because at this point I know exactly what needs to be done conceptually, but the code fragments and hints given with it don't make a lot of sense to me and I've spent more time trying to figure out what the hints are trying to say than what the question is asking.
>
>
> ----- Original Message -----
> From: "David L. Rager" <rag...@gmail.com>
> To: "utexas-cs352-fall2009" <utexas-cs3...@googlegroups.com>
> Sent: Tuesday, November 24, 2009 12:02:25 AM GMT -06:00 US/Canada Central
> Subject: Re: CS352 Homework 10 / General Question
>
>
> MAP_PRIVATE means that any changes to the memory-mapped region can
> only be seen by that particular process. MAP_SHARED means that the
> changes can be seen by other processes. Guess which one you need if
> you want to change a file in a way that persists beyond one particular
> process.
>
> On Mon, Nov 23, 2009 at 9:42 PM, wrote:
>> I think this could help me in my solution to 10.14 since 10.5 is very
>> similar in scope. In the solution given to 10.5, bufp gets the flag
>> "MAP_PRIVATE". Would using "MAP_SHARED" have a negative effect on the
>> program? I guess what I'm trying to say is that I don't understand the
>> difference between the two and the book doesn't really help. Could you
>> explain the difference and/or effect of using one over the other? Thank you
>> in advance for any help.
Bingo.