Changeset 23 for trunk/kernel/syscalls/sys_mmap.c
- Timestamp:
- Jun 18, 2017, 10:06:41 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_mmap.c
r1 r23 1 1 /* 2 * kern/sys_mmap.c - map files, memory or devices into process's 3 * virtual address space 2 * sys_mmap.c - map files, memory or devices into process virtual address space 4 3 * 5 * Copyright (c) 2008,2009,2010,2011,2012 Ghassan Almaless6 * Copyright (c) 2011,2012 UPMC Sorbonne Universites4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 * Alain Greiner (2016,2017) 7 6 * 8 * This file is part of ALMOS-kernel.7 * Copyright (c) UPMC Sorbonne Universites 9 8 * 10 * ALMOS-kernel is free software; you can redistribute it and/or modify it 9 * This file is part of ALMOS-MKH. 10 * 11 * ALMOS-MKH is free software; you can redistribute it and/or modify it 11 12 * under the terms of the GNU General Public License as published by 12 13 * the Free Software Foundation; version 2.0 of the License. 13 14 * 14 * ALMOS- kernelis distributed in the hope that it will be useful, but15 * ALMOS-MKH is distributed in the hope that it will be useful, but 15 16 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU … … 18 19 * 19 20 * You should have received a copy of the GNU General Public License 20 * along with ALMOS- kernel; if not, write to the Free Software Foundation,21 * along with ALMOS-MKH; if not, write to the Free Software Foundation, 21 22 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 23 */ 23 24 25 #include <hal_types.h> 24 26 #include <errno.h> 25 27 #include <thread.h> 28 #include <printk.h> 26 29 #include <vfs.h> 27 #include <sys-vfs.h>28 30 #include <process.h> 29 31 #include <vmm.h> 30 32 31 33 /////////////////////////////////// 32 int sys_mmap( mmap_attr_t * mattr )34 int sys_mmap( mmap_attr_t * attr ) 33 35 { 36 printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ ); 37 return 0; 38 /* 34 39 error_t err; 35 40 uint_t count; … … 46 51 file = NULL; 47 52 48 if((err = cpu_copy_from_uspace(&attr, mattr, sizeof(mmap_attr_t))))53 if((err = cpu_copy_from_uspace(&attr, attr, sizeof(mmap_attr_t)))) 49 54 { 50 55 printk(INFO, "%s: failed, copying from uspace @%x\n", 51 56 __FUNCTION__, 52 mattr);57 attr); 53 58 54 59 this->info.errno = EFAULT; … … 82 87 else 83 88 { 84 / * FIXEME: possible concurent delete of file from another bugy thread closing it */89 // FIXME: possible concurent delete of file from another bugy thread closing it 85 90 if((attr.fd >= CONFIG_TASK_FILE_MAX_NR) || (process_fd_lookup(process, attr.fd, &file))) 86 91 { … … 145 150 146 151 return (int)VM_FAILED; 147 } 152 */ 153 } // end sys_mmap()
Note: See TracChangeset
for help on using the changeset viewer.