Changeset 2463df9 in mainline


Ignore:
Timestamp:
2014-02-11T04:38:26Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
89dcf93
Parents:
b6e481b
Message:

Remove the temptation to use mmap() and munmap() in native code.

Location:
uspace
Files:
1 deleted
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/block/block.c

    rb6e481b r2463df9  
    4040#include <ipc/services.h>
    4141#include <errno.h>
    42 #include <sys/mman.h>
    4342#include <async.h>
    4443#include <as.h>
  • uspace/lib/c/Makefile

    rb6e481b r2463df9  
    131131        generic/time.c \
    132132        generic/stdlib.c \
    133         generic/mman.c \
    134133        generic/udebug.c \
    135134        generic/vfs/vfs.c \
  • uspace/lib/drv/generic/remote_audio_pcm.c

    rb6e481b r2463df9  
    3838#include <macros.h>
    3939#include <str.h>
    40 #include <sys/mman.h>
     40#include <as.h>
    4141
    4242#include "audio_pcm_iface.h"
  • uspace/lib/posix/Makefile

    rb6e481b r2463df9  
    7373        source/string.c \
    7474        source/strings.c \
     75        source/sys/mman.c \
    7576        source/sys/stat.c \
    7677        source/sys/wait.c \
  • uspace/lib/posix/include/posix/sys/mman.h

    rb6e481b r2463df9  
    4040#endif
    4141
    42 #include "sys/types.h"
     42#include "types.h"
    4343#include <abi/mm/as.h>
    4444
     
    6060#define PROT_EXEC  AS_AREA_EXEC
    6161
    62 extern void *mmap(void *start, size_t length, int prot, int flags, int fd,
     62extern void *
     63__POSIX_DEF__(mmap)(void *start, size_t length, int prot, int flags, int fd,
    6364    __POSIX_DEF__(off_t) offset);
    64 extern int munmap(void *start, size_t length);
     65extern int __POSIX_DEF__(munmap)(void *start, size_t length);
    6566
    6667
  • uspace/lib/posix/source/sys/mman.c

    rb6e481b r2463df9  
    2727 */
    2828
    29 /** @addtogroup libc
     29/** @addtogroup libposix
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include <sys/mman.h>
    36 #include <sys/types.h>
    37 #include <as.h>
    38 #include <unistd.h>
     35#define LIBPOSIX_INTERNAL
     36#define __POSIX_DEF__(x) posix_##x
    3937
    40 void *mmap(void *start, size_t length, int prot, int flags, int fd,
    41     aoff64_t offset)
     38#include "../internal/common.h"
     39#include <posix/sys/mman.h>
     40#include <posix/sys/types.h>
     41#include <libc/as.h>
     42#include <posix/unistd.h>
     43
     44void *posix_mmap(void *start, size_t length, int prot, int flags, int fd,
     45    __POSIX_DEF__(off_t) offset)
    4246{
    4347        if (!start)
     
    5357}
    5458
    55 int munmap(void *start, size_t length)
     59int posix_munmap(void *start, size_t length)
    5660{
    5761        return as_area_destroy(start);
  • uspace/srv/fs/exfat/exfat_ops.c

    rb6e481b r2463df9  
    5858#include <assert.h>
    5959#include <fibril_synch.h>
    60 #include <sys/mman.h>
    6160#include <align.h>
    6261#include <malloc.h>
  • uspace/srv/fs/fat/fat_ops.c

    rb6e481b r2463df9  
    5555#include <assert.h>
    5656#include <fibril_synch.h>
    57 #include <sys/mman.h>
    5857#include <align.h>
    5958#include <malloc.h>
  • uspace/srv/fs/udf/udf_ops.c

    rb6e481b r2463df9  
    5050#include <assert.h>
    5151#include <fibril_synch.h>
    52 #include <sys/mman.h>
    5352#include <align.h>
    5453#include <malloc.h>
Note: See TracChangeset for help on using the changeset viewer.