Subversion Repositories HelenOS-historic

Rev

Rev 1653 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1653 Rev 1719
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
 /** @addtogroup libc
29
/** @addtogroup libc
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
35
#include <sys/mman.h>
35
#include <sys/mman.h>
36
#include <as.h>
36
#include <as.h>
37
#include <unistd.h>
37
#include <unistd.h>
38
 
38
 
39
void *mmap(void  *start, size_t length, int prot, int flags, int fd,
39
void *mmap(void  *start, size_t length, int prot, int flags, int fd, off_t offset)
40
       off_t offset)
-
 
41
{
40
{
42
    int rc;
-
 
43
 
-
 
44
    if (!start)
41
    if (!start)
45
        start = as_get_mappable_page(length);
42
        start = as_get_mappable_page(length);
46
   
43
   
47
//  if (! ((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE)))
44
//  if (! ((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE)))
48
//      return MAP_FAILED;
45
//      return MAP_FAILED;
Line 56... Line 53...
56
{
53
{
57
    return as_area_destroy(start);
54
    return as_area_destroy(start);
58
}
55
}
59
 
56
 
60
 
57
 
61
 /** @}
58
/** @}
62
 */
59
 */
63
 
-
 
64
 
-