Changeset 371bd7d in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2010-03-27T09:22:17Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36a75a2
Parents:
cd82bb1 (diff), eaf22d4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace/lib/c/include
Files:
9 added
73 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/adt/hash_table.h

    rcd82bb1 r371bd7d  
    8888extern void hash_table_remove(hash_table_t *, unsigned long [], hash_count_t);
    8989extern void hash_table_destroy(hash_table_t *);
     90extern void hash_table_apply(hash_table_t *, void (*)(link_t *, void *),
     91    void *);
    9092
    9193#endif
  • uspace/lib/c/include/assert.h

    rcd82bb1 r371bd7d  
    5151
    5252#ifndef NDEBUG
    53 #       define assert(expr) if (!(expr)) { printf("Assertion failed (%s) at file '%s', line %d.\n", #expr, __FILE__, __LINE__); abort();}
     53#       define assert(expr) \
     54                do { \
     55                        if (!(expr)) { \
     56                                printf("Assertion failed (%s) at file '%s', " \
     57                                    "line %d.\n", #expr, __FILE__, __LINE__); \
     58                                abort(); \
     59                        } \
     60                } while (0)
    5461#else
    5562#       define assert(expr)
  • uspace/lib/c/include/async.h

    rcd82bb1 r371bd7d  
    259259}
    260260
     261extern int async_connect_me_to(int, ipcarg_t, ipcarg_t, ipcarg_t);
     262extern int async_connect_me_to_blocking(int, ipcarg_t, ipcarg_t, ipcarg_t);
     263
    261264/*
    262265 * User-friendly wrappers for async_share_in_start().
     
    277280extern int async_share_out_receive(ipc_callid_t *, size_t *, int *);
    278281extern int async_share_out_finalize(ipc_callid_t, void *);
     282
     283/*
     284 * User-friendly wrappers for async_data_read_forward_fast().
     285 */
     286#define async_data_read_forward_0_0(phoneid, method, answer) \
     287        async_data_read_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
     288#define async_data_read_forward_0_1(phoneid, method, answer) \
     289        async_data_read_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
     290#define async_data_read_forward_1_0(phoneid, method, arg1, answer) \
     291        async_data_read_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
     292#define async_data_read_forward_1_1(phoneid, method, arg1, answer) \
     293        async_data_read_forward_fast((phoneid), (method), (arg1), 0, 0, 0, (answer))
     294#define async_data_read_forward_2_0(phoneid, method, arg1, arg2, answer) \
     295        async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL)
     296#define async_data_read_forward_2_1(phoneid, method, arg1, arg2, answer) \
     297        async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
     298            (answer))
     299#define async_data_read_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
     300        async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
     301            NULL)
     302#define async_data_read_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
     303        async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
     304            (answer))
     305#define async_data_read_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
     306        async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     307            (arg4), NULL)
     308#define async_data_read_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
     309        async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     310            (arg4), (answer))
     311
    279312extern int async_data_read_start(int, void *, size_t);
    280313extern int async_data_read_receive(ipc_callid_t *, size_t *);
    281314extern int async_data_read_finalize(ipc_callid_t, const void *, size_t);
     315
     316extern int async_data_read_forward_fast(int, ipcarg_t, ipcarg_t, ipcarg_t,
     317    ipcarg_t, ipcarg_t, ipc_call_t *);
     318
     319/*
     320 * User-friendly wrappers for async_data_write_forward_fast().
     321 */
     322#define async_data_write_forward_0_0(phoneid, method, answer) \
     323        async_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
     324#define async_data_write_forward_0_1(phoneid, method, answer) \
     325        async_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
     326#define async_data_write_forward_1_0(phoneid, method, arg1, answer) \
     327        async_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
     328#define async_data_write_forward_1_1(phoneid, method, arg1, answer) \
     329        async_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, \
     330            (answer))
     331#define async_data_write_forward_2_0(phoneid, method, arg1, arg2, answer) \
     332        async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
     333            NULL)
     334#define async_data_write_forward_2_1(phoneid, method, arg1, arg2, answer) \
     335        async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
     336            (answer))
     337#define async_data_write_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
     338        async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     339            0, NULL)
     340#define async_data_write_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
     341        async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     342            0, (answer))
     343#define async_data_write_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
     344        async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     345            (arg4), NULL)
     346#define async_data_write_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
     347        async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     348            (arg4), (answer))
     349
    282350extern int async_data_write_start(int, const void *, size_t);
    283351extern int async_data_write_receive(ipc_callid_t *, size_t *);
    284352extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
    285353
     354extern int async_data_write_accept(void **, const bool, const size_t,
     355    const size_t, const size_t, size_t *);
     356extern void async_data_write_void(const int);
     357
     358extern int async_data_write_forward_fast(int, ipcarg_t, ipcarg_t, ipcarg_t,
     359    ipcarg_t, ipcarg_t, ipc_call_t *);
     360
    286361#endif
    287362
  • uspace/lib/c/include/devmap.h

    rcd82bb1 r371bd7d  
    3838#include <ipc/devmap.h>
    3939#include <async.h>
     40#include <bool.h>
    4041
    4142extern int devmap_get_phone(devmap_interface_t, unsigned int);
     
    4647
    4748extern int devmap_device_get_handle(const char *, dev_handle_t *, unsigned int);
     49extern int devmap_namespace_get_handle(const char *, dev_handle_t *, unsigned int);
     50extern devmap_handle_type_t devmap_handle_probe(dev_handle_t);
     51
    4852extern int devmap_device_connect(dev_handle_t, unsigned int);
    4953
     
    5155extern void devmap_null_destroy(int);
    5256
    53 extern ipcarg_t devmap_device_get_count(void);
    54 extern ipcarg_t devmap_device_get_devices(ipcarg_t, dev_desc_t *);
     57extern size_t devmap_count_namespaces(void);
     58extern size_t devmap_count_devices(dev_handle_t);
     59
     60extern size_t devmap_get_namespaces(dev_desc_t **);
     61extern size_t devmap_get_devices(dev_handle_t, dev_desc_t **);
    5562
    5663#endif
  • uspace/lib/c/include/fibril.h

    rcd82bb1 r371bd7d  
    4040#include <libarch/tls.h>
    4141
    42 #ifndef context_set
    43 #define context_set(c, _pc, stack, size, ptls) \
     42#define context_set_generic(c, _pc, stack, size, ptls) \
    4443        (c)->pc = (sysarg_t) (_pc); \
    4544        (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
    4645        (c)->tls = (sysarg_t) (ptls);
    47 #endif /* context_set */
    4846
    49 #define FIBRIL_SERIALIZED       1
    50 #define FIBRIL_WRITER           2
     47#define FIBRIL_SERIALIZED  1
     48#define FIBRIL_WRITER      2
    5149
    5250typedef enum {
     
    5957typedef sysarg_t fid_t;
    6058
    61 struct fibril {
     59typedef struct fibril {
    6260        link_t link;
    6361        context_t ctx;
     
    7068        int retval;
    7169        int flags;
    72 };
    73 typedef struct fibril fibril_t;
     70} fibril_t;
    7471
    7572/** Fibril-local variable specifier */
    7673#define fibril_local __thread
    7774
    78 extern int context_save(context_t *c) __attribute__ ((returns_twice));
    79 extern void context_restore(context_t *c) __attribute__ ((noreturn));
     75extern int context_save(context_t *ctx) __attribute__((returns_twice));
     76extern void context_restore(context_t *ctx) __attribute__((noreturn));
    8077
    8178extern fid_t fibril_create(int (*func)(void *), void *arg);
     
    9087extern void fibril_dec_sercount(void);
    9188
    92 static inline int fibril_yield(void) {
     89static inline int fibril_yield(void)
     90{
    9391        return fibril_switch(FIBRIL_PREEMPT);
    9492}
  • uspace/lib/c/include/fibril_synch.h

    rcd82bb1 r371bd7d  
    3333 */
    3434
    35 #ifndef LIBC_FIBRIL_SYNC_H_
    36 #define LIBC_FIBRIL_SYNC_H_
     35#ifndef LIBC_FIBRIL_SYNCH_H_
     36#define LIBC_FIBRIL_SYNCH_H_
    3737
    3838#include <async.h>
  • uspace/lib/c/include/futex.h

    rcd82bb1 r371bd7d  
    4646extern int futex_down(futex_t *futex);
    4747extern int futex_trydown(futex_t *futex);
    48 extern int futex_down_timeout(futex_t *futex, uint32_t usec, int flags);
    4948extern int futex_up(futex_t *futex);
    5049
  • uspace/lib/c/include/ipc/bd.h

    rcd82bb1 r371bd7d  
    4040typedef enum {
    4141        BD_GET_BLOCK_SIZE = IPC_FIRST_USER_METHOD,
     42        BD_GET_NUM_BLOCKS,
    4243        BD_READ_BLOCKS,
    4344        BD_WRITE_BLOCKS
  • uspace/lib/c/include/ipc/devmap.h

    rcd82bb1 r371bd7d  
    4343
    4444typedef enum {
     45        DEV_HANDLE_NONE,
     46        DEV_HANDLE_NAMESPACE,
     47        DEV_HANDLE_DEVICE
     48} devmap_handle_type_t;
     49
     50typedef enum {
    4551        DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
    4652        DEVMAP_DRIVER_UNREGISTER,
    4753        DEVMAP_DEVICE_REGISTER,
    4854        DEVMAP_DEVICE_UNREGISTER,
    49         DEVMAP_DEVICE_GET_NAME,
    5055        DEVMAP_DEVICE_GET_HANDLE,
    51         DEVMAP_DEVICE_NULL_CREATE,
    52         DEVMAP_DEVICE_NULL_DESTROY,
    53         DEVMAP_DEVICE_GET_COUNT,
    54         DEVMAP_DEVICE_GET_DEVICES
     56        DEVMAP_NAMESPACE_GET_HANDLE,
     57        DEVMAP_HANDLE_PROBE,
     58        DEVMAP_NULL_CREATE,
     59        DEVMAP_NULL_DESTROY,
     60        DEVMAP_GET_NAMESPACE_COUNT,
     61        DEVMAP_GET_DEVICE_COUNT,
     62        DEVMAP_GET_NAMESPACES,
     63        DEVMAP_GET_DEVICES
    5564} devmap_request_t;
    5665
  • uspace/lib/c/include/ipc/services.h

    rcd82bb1 r371bd7d  
    4141        SERVICE_LOAD = 1,
    4242        SERVICE_PCI,
    43         SERVICE_KEYBOARD,
    4443        SERVICE_VIDEO,
    4544        SERVICE_CONSOLE,
     
    4746        SERVICE_DEVMAP,
    4847        SERVICE_FHC,
    49         SERVICE_OBIO
     48        SERVICE_OBIO,
     49        SERVICE_CLIPBOARD,
     50        SERVICE_NETWORKING,
     51        SERVICE_LO,
     52        SERVICE_DP8390,
     53        SERVICE_ETHERNET,
     54        SERVICE_NILDUMMY,
     55        SERVICE_IP,
     56        SERVICE_ARP,
     57        SERVICE_RARP,
     58        SERVICE_ICMP,
     59        SERVICE_UDP,
     60        SERVICE_TCP,
     61        SERVICE_SOCKET
    5062} services_t;
    5163
  • uspace/lib/c/include/ipc/vfs.h

    rcd82bb1 r371bd7d  
    8686        VFS_OUT_MOUNTED,
    8787        VFS_OUT_UNMOUNT,
     88        VFS_OUT_UNMOUNTED,
    8889        VFS_OUT_SYNC,
    8990        VFS_OUT_STAT,
     
    100101 * No lookup flags used.
    101102 */
    102 #define L_NONE  0
     103#define L_NONE                  0
    103104
    104105/**
     
    107108 * with L_DIRECTORY.
    108109 */
    109 #define L_FILE  1
     110#define L_FILE                  1
    110111
    111112/**
    112  * Lookup wil succeed only if the object is a directory. If L_CREATE is
     113 * Lookup will succeed only if the object is a directory. If L_CREATE is
    113114 * specified, an empty directory will be created. This flag is mutually
    114115 * exclusive with L_FILE.
    115116 */
    116 #define L_DIRECTORY  2
     117#define L_DIRECTORY             2
     118
     119/**
     120 * Lookup will succeed only if the object is a root directory. The flag is
     121 * mutually exclusive with L_FILE and L_MP.
     122 */
     123#define L_ROOT                  4
     124
     125/**
     126 * Lookup will succeed only if the object is a mount point. The flag is mutually
     127 * exclusive with L_FILE and L_ROOT.
     128 */
     129#define L_MP                    8
     130
    117131
    118132/**
     
    120134 * object already exists. L_EXCLUSIVE is implied when L_DIRECTORY is used.
    121135 */
    122 #define L_EXCLUSIVE  4
     136#define L_EXCLUSIVE             16
    123137
    124138/**
    125139 * L_CREATE is used for creating both regular files and directories.
    126140 */
    127 #define L_CREATE  8
     141#define L_CREATE                32
    128142
    129143/**
    130144 * L_LINK is used for linking to an already existing nodes.
    131145 */
    132 #define L_LINK  16
     146#define L_LINK                  64
    133147
    134148/**
     
    137151 * VFS_UNLINK.
    138152 */
    139 #define L_UNLINK  32
     153#define L_UNLINK                128
    140154
    141155/**
    142  * L_OPEN is used to indicate that the lookup operation is a part of VFS_OPEN
     156 * L_OPEN is used to indicate that the lookup operation is a part of VFS_IN_OPEN
    143157 * call from the client. This means that the server might allocate some
    144158 * resources for the opened file. This flag cannot be passed directly by the
    145159 * client.
    146160 */
    147 #define L_OPEN  64
     161#define L_OPEN                  256
    148162
    149163#endif
  • uspace/lib/c/include/limits.h

    rcd82bb1 r371bd7d  
    4646
    4747#ifdef __CHAR_UNSIGNED__
    48 # define CHAR_MIN UCHAR_MIN
    49 # define CHAR_MAX UCHAR_MAX
     48        #define CHAR_MIN UCHAR_MIN
     49        #define CHAR_MAX UCHAR_MAX
    5050#else
    51 # define CHAR_MIN SCHAR_MIN
    52 # define CHAR_MAX SCHAR_MAX
     51        #define CHAR_MIN SCHAR_MIN
     52        #define CHAR_MAX SCHAR_MAX
    5353#endif
    5454
     
    5959#define USHRT_MAX MAX_UINT16
    6060
     61/* int */
    6162#define INT_MIN MIN_INT32
    6263#define INT_MAX MAX_INT32
     
    6465#define UINT_MAX MAX_UINT32
    6566
     67/* long long int */
    6668#define LLONG_MIN MIN_INT64
    6769#define LLONG_MAX MAX_INT64
     
    6971#define ULLONG_MAX MAX_UINT64
    7072
     73/* off64_t */
     74#define OFF64_MIN MIN_INT64
     75#define OFF64_MAX MAX_INT64
     76
     77/* aoff64_t */
     78#define AOFF64_MIN MIN_UINT64
     79#define AOFF64_MAX MAX_UINT64
     80
    7181#endif
    7282
  • uspace/lib/c/include/loader/loader.h

    rcd82bb1 r371bd7d  
    5151extern int loader_set_cwd(loader_t *);
    5252extern int loader_set_pathname(loader_t *, const char *);
    53 extern int loader_set_args(loader_t *, char *const[]);
     53extern int loader_set_args(loader_t *, const char *const[]);
    5454extern int loader_set_files(loader_t *, fdi_node_t *const[]);
    5555extern int loader_load_program(loader_t *);
  • uspace/lib/c/include/macros.h

    rcd82bb1 r371bd7d  
    4848#define STRING_ARG(arg)  #arg
    4949
    50 #define LOWER32(arg)  ((arg) & 0xffffffff)
    51 #define UPPER32(arg)  (((arg) >> 32) & 0xffffffff)
     50#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
     51#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
    5252
    5353#define MERGE_LOUP32(lo, up) \
  • uspace/lib/c/include/stdio.h

    rcd82bb1 r371bd7d  
    3838#include <sys/types.h>
    3939#include <stdarg.h>
    40 #include <string.h>
     40#include <str.h>
    4141#include <adt/list.h>
    4242
     
    4646#define BUFSIZ  4096
    4747
    48 #define DEBUG(fmt, ...) \
     48#define DEBUG(fmt, ...)se\
    4949        { \
    5050                char _buf[256]; \
     
    5656#ifndef SEEK_SET
    5757        #define SEEK_SET  0
     58#endif
     59
     60#ifndef SEEK_CUR
    5861        #define SEEK_CUR  1
     62#endif
     63
     64#ifndef SEEK_END
    5965        #define SEEK_END  2
    6066#endif
     
    6773        /** Full buffering */
    6874        _IOFBF
     75};
     76
     77enum _buffer_state {
     78        /** Buffer is empty */
     79        _bs_empty,
     80
     81        /** Buffer contains data to be written */
     82        _bs_write,
     83
     84        /** Buffer contains prefetched data for reading */
     85        _bs_read
    6986};
    7087
     
    88105        int phone;
    89106
     107        /**
     108         * Non-zero if the stream needs sync on fflush(). XXX change
     109         * console semantics so that sync is not needed.
     110         */
     111        int need_sync;
     112
    90113        /** Buffering type */
    91114        enum _buffer_type btype;
     115
    92116        /** Buffer */
    93117        uint8_t *buf;
     118
    94119        /** Buffer size */
    95120        size_t buf_size;
     121
     122        /** Buffer state */
     123        enum _buffer_state buf_state;
     124
    96125        /** Buffer I/O pointer */
    97126        uint8_t *buf_head;
     127
     128        /** Points to end of occupied space when in read mode. */
     129        uint8_t *buf_tail;
    98130} FILE;
    99131
     
    104136/* Character and string input functions */
    105137extern int fgetc(FILE *);
    106 extern char *fgets(char *, size_t, FILE *);
     138extern char *fgets(char *, int, FILE *);
    107139
    108140extern int getchar(void);
     
    135167extern size_t fwrite(const void *, size_t, size_t, FILE *);
    136168
    137 extern int fseek(FILE *, long, int);
     169extern int fseek(FILE *, off64_t, int);
    138170extern void rewind(FILE *);
    139 extern int ftell(FILE *);
     171extern off64_t ftell(FILE *);
    140172extern int feof(FILE *);
    141173
  • uspace/lib/c/include/stdlib.h

    rcd82bb1 r371bd7d  
    3838#include <unistd.h>
    3939#include <malloc.h>
     40#include <stacktrace.h>
    4041
    41 #define abort()       _exit(1)
     42#define abort() \
     43        do { \
     44                stacktrace_print(); \
     45                _exit(1); \
     46        } while (0)
     47
    4248#define exit(status)  _exit((status))
    4349
  • uspace/lib/c/include/str.h

    rcd82bb1 r371bd7d  
    3333 */
    3434
    35 #ifndef LIBC_STRING_H_
    36 #define LIBC_STRING_H_
     35#ifndef LIBC_STR_H_
     36#define LIBC_STR_H_
    3737
    3838#include <mem.h>
     
    8484
    8585extern char *str_dup(const char *);
     86extern char *str_ndup(const char *, size_t max_size);
    8687
    8788/*
  • uspace/lib/c/include/sys/mman.h

    rcd82bb1 r371bd7d  
    4141#define MAP_FAILED  ((void *) -1)
    4242
    43 #define MAP_SHARED       (1 << 0)
    44 #define MAP_PRIVATE      (1 << 1)
    45 #define MAP_FIXED        (1 << 2)
    46 #define MAP_ANONYMOUS    (1 << 3)
     43#define MAP_SHARED     (1 << 0)
     44#define MAP_PRIVATE    (1 << 1)
     45#define MAP_FIXED      (1 << 2)
     46#define MAP_ANONYMOUS  (1 << 3)
    4747
    4848#define PROTO_READ   AS_AREA_READ
     
    5050#define PROTO_EXEC   AS_AREA_EXEC
    5151
    52 extern void *mmap(void  *start, size_t length, int prot, int flags, int fd,
    53     off_t offset);
     52extern void *mmap(void *start, size_t length, int prot, int flags, int fd,
     53    aoff64_t offset);
    5454extern int munmap(void *start, size_t length);
    5555
  • uspace/lib/c/include/sys/stat.h

    rcd82bb1 r371bd7d  
    3131 */
    3232/** @file
    33  */ 
     33 */
    3434
    3535#ifndef LIBC_SYS_STAT_H_
     
    4242
    4343struct stat {
    44         fs_handle_t     fs_handle;
    45         dev_handle_t    dev_handle;
    46         fs_index_t      index;
    47         unsigned        lnkcnt;
    48         bool            is_file;
    49         off_t           size;
    50         union {
    51                 struct {
    52                         dev_handle_t    device;
    53                 } devfs_stat;
    54         };
     44        fs_handle_t fs_handle;
     45        dev_handle_t dev_handle;
     46        fs_index_t index;
     47        unsigned int lnkcnt;
     48        bool is_file;
     49        bool is_directory;
     50        aoff64_t size;
     51        dev_handle_t device;
    5552};
    5653
  • uspace/lib/c/include/sys/time.h

    rcd82bb1 r371bd7d  
    3131 */
    3232/** @file
    33  */ 
     33 */
    3434
    3535#ifndef LIBC_SYS_TIME_H_
     
    4444
    4545struct timeval {
    46         time_t         tv_sec;        /* seconds */
    47         suseconds_t    tv_usec;  /* microseconds */
     46        time_t tv_sec;        /* seconds */
     47        suseconds_t tv_usec;  /* microseconds */
    4848};
    4949
    5050struct timezone {
    51         int  tz_minuteswest; /* minutes W of Greenwich */
    52         int  tz_dsttime;     /* type of dst correction */
     51        int tz_minuteswest; /* minutes W of Greenwich */
     52        int tz_dsttime;      /* type of dst correction */
    5353};
    5454
  • uspace/lib/c/include/sys/types.h

    rcd82bb1 r371bd7d  
    3838#include <libarch/types.h>
    3939
    40 typedef long off_t;
    41 typedef int mode_t;
     40typedef unsigned int mode_t;
    4241
     42/** Relative offset */
     43typedef int64_t off64_t;
     44
     45/** Absolute offset */
     46typedef uint64_t aoff64_t;
     47
     48/** Unicode code point */
    4349typedef int32_t wchar_t;
    4450
  • uspace/lib/c/include/sysinfo.h

    rcd82bb1 r371bd7d  
    3838#include <libc.h>
    3939#include <sysinfo.h>
    40 #include <string.h>
     40#include <str.h>
    4141
    42 sysarg_t sysinfo_value(char *name);
     42sysarg_t sysinfo_value(const char *name);
    4343
    4444#endif
  • uspace/lib/c/include/task.h

    rcd82bb1 r371bd7d  
    4747extern task_id_t task_get_id(void);
    4848extern int task_set_name(const char *name);
    49 extern task_id_t task_spawn(const char *path, char *const argv[]);
     49extern task_id_t task_spawn(const char *path, const char *const argv[]);
    5050extern int task_wait(task_id_t id, task_exit_t *texit, int *retval);
    5151extern int task_retval(int val);
  • uspace/lib/c/include/thread.h

    rcd82bb1 r371bd7d  
    4545extern void __thread_main(uspace_arg_t *);
    4646
    47 extern int thread_create(void (*)(void *), void *, char *, thread_id_t *);
     47extern int thread_create(void (*)(void *), void *, const char *, thread_id_t *);
    4848extern void thread_exit(int) __attribute__ ((noreturn));
    4949extern void thread_detach(thread_id_t);
  • uspace/lib/c/include/udebug.h

    rcd82bb1 r371bd7d  
    4747int udebug_thread_read(int phoneid, void *buffer, size_t n,
    4848        size_t *copied, size_t *needed);
     49int udebug_name_read(int phoneid, void *buffer, size_t n,
     50        size_t *copied, size_t *needed);
     51int udebug_areas_read(int phoneid, void *buffer, size_t n,
     52        size_t *copied, size_t *needed);
    4953int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n);
    5054int udebug_args_read(int phoneid, thash_t tid, sysarg_t *buffer);
     55int udebug_regs_read(int phoneid, thash_t tid, void *buffer);
    5156int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type,
    5257        sysarg_t *val0, sysarg_t *val1);
  • uspace/lib/c/include/unistd.h

    rcd82bb1 r371bd7d  
    4747#ifndef SEEK_SET
    4848        #define SEEK_SET  0
     49#endif
     50
     51#ifndef SEEK_CUR
    4952        #define SEEK_CUR  1
     53#endif
     54
     55#ifndef SEEK_END
    5056        #define SEEK_END  2
    5157#endif
     58
     59typedef uint32_t useconds_t;
    5260
    5361extern int dup2(int oldfd, int newfd);
     
    5664extern ssize_t read(int, void *, size_t);
    5765
    58 extern off_t lseek(int, off_t, int);
    59 extern int ftruncate(int, off_t);
     66extern off64_t lseek(int, off64_t, int);
     67extern int ftruncate(int, aoff64_t);
    6068
    6169extern int close(int);
     
    6775extern int chdir(const char *);
    6876
    69 extern void _exit(int status) __attribute__ ((noreturn));
    70 extern int usleep(unsigned long usec);
    71 extern unsigned int sleep(unsigned int seconds);
     77extern void _exit(int) __attribute__((noreturn));
     78extern int usleep(useconds_t);
     79extern unsigned int sleep(unsigned int);
    7280
    7381#endif
  • uspace/lib/c/include/vfs/vfs.h

    rcd82bb1 r371bd7d  
    4343/**
    4444 * This type is a libc version of the VFS triplet.
    45  * It uniquelly identifies a file system node within a file system instance.
     45 * It uniquely identifies a file system node within a file system instance.
    4646 */
    4747typedef struct {
     
    5555extern int mount(const char *, const char *, const char *, const char *,
    5656    unsigned int);
     57extern int unmount(const char *);
    5758
    5859extern void __stdio_init(int filc, fdi_node_t *filv[]);
Note: See TracChangeset for help on using the changeset viewer.