[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    RE: patch for libs/wine/mmap.c making wine running on FreeBSD 5.x
From:       "jean-marc DETREZ" <jm.detrez () cegetel ! net>
Date:       2005-07-28 19:31:39
Message-ID: 20050728193151.4D90A3181FD () smtp ! cegetel ! net
[Download RAW message or body]

Perhaps i found the begin of an explanation, in NetBSD and linux , error
codes for mincore() are :  
     [EFAULT]           vec points to an illegal address.

     [EINVAL]           addr is not a multiple of the system page size.

     [EINVAL]           len is equal to 0.

     [ENOMEM]           The address range specified is invalid for the
calling process, or one or more of the pages specified in the range are not
mapped                 

So I think that when you call mincore for testing if a page is mapped or not
the result would be -1 and errno set to ENOMEM.


But in FreeBSD a man mincore give this errors conditions:

     [EFAULT]           vec points to an illegal address.

     [EINVAL]           addr is not a multiple of the system page size.

It seems that when a page is not mapped mincore return no error code.


-----Message d'origine-----
De : julliard@wine.dyndns.org [mailto:julliard@wine.dyndns.org] De la part
de Alexandre Julliard
Envoyé : jeudi 28 juillet 2005 11:48
À : jean-marc DETREZ
Cc : wine-devel@winehq.com; emulation@freebsd.org; 'Gerald Pfeifer';
barner@freebsd.org
Objet : Re: patch for libs/wine/mmap.c making wine running on FreeBSD 5.x

"jean-marc DETREZ" <jm.detrez@cegetel.net> writes:

>   I made a little correction of  "try_mmap_fixed" because it's seems to me
> that the function didn't really test the result (vec).

That's the way it should be, we don't care if the page is in core or
not, we only want to know if something is mapped there.

-- 
Alexandre Julliard
julliard@winehq.org




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic