Changeset 95c675b in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2017-10-17T13:11:35Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60af4cdb
Parents:
dbf32b1 (diff), a416d070 (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

Location:
uspace/lib/c/include
Files:
3 added
45 edited
5 moved

Legend:

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

    rdbf32b1 r95c675b  
    3636
    3737#include <stdint.h>
     38#include <types/common.h>
    3839
    3940/** Produces a uniform hash affecting all output bits from the skewed input. */
  • uspace/lib/c/include/adt/list.h

    rdbf32b1 r95c675b  
    4040#include <stdbool.h>
    4141#include <stddef.h>
     42#include <trace.h>
    4243
    4344/** Doubly linked list link. */
     
    5152        link_t head;  /**< List head. Does not have any data. */
    5253} list_t;
     54
     55extern bool list_member(const link_t *, const list_t *);
     56extern void list_splice(list_t *, link_t *);
     57extern unsigned long list_count(const list_t *);
    5358
    5459/** Declare and initialize statically allocated list.
     
    8893#define list_foreach(list, member, itype, iterator) \
    8994        for (itype *iterator = NULL; iterator == NULL; iterator = (itype *) 1) \
    90             for (link_t *_link = (list).head.next; \
    91             iterator = list_get_instance(_link, itype, member), \
    92             _link != &(list).head; _link = _link->next)
     95                for (link_t *_link = (list).head.next; \
     96                    iterator = list_get_instance(_link, itype, member), \
     97                    _link != &(list).head; _link = _link->next)
    9398
    9499#define list_foreach_rev(list, member, itype, iterator) \
    95100        for (itype *iterator = NULL; iterator == NULL; iterator = (itype *) 1) \
    96             for (link_t *_link = (list).head.prev; \
    97             iterator = list_get_instance(_link, itype, member), \
    98             _link != &(list).head; _link = _link->prev)
     101                for (link_t *_link = (list).head.prev; \
     102                    iterator = list_get_instance(_link, itype, member), \
     103                    _link != &(list).head; _link = _link->prev)
    99104
    100105/** Unlike list_foreach(), allows removing items while traversing a list.
     
    125130#define list_foreach_safe(list, iterator, next_iter) \
    126131        for (link_t *iterator = (list).head.next, \
    127                 *next_iter = iterator->next; \
    128                 iterator != &(list).head; \
    129                 iterator = next_iter, next_iter = iterator->next)
     132            *next_iter = iterator->next; \
     133            iterator != &(list).head; \
     134            iterator = next_iter, next_iter = iterator->next)
    130135
    131136#define assert_link_not_used(link) \
     
    145150 *
    146151 */
    147 static inline void link_initialize(link_t *link)
     152NO_TRACE static inline void link_initialize(link_t *link)
    148153{
    149154        link->prev = NULL;
     
    158163 *
    159164 */
    160 static inline void list_initialize(list_t *list)
     165NO_TRACE static inline void list_initialize(list_t *list)
    161166{
    162167        list->head.prev = &list->head;
     
    194199 *
    195200 */
    196 static inline void list_prepend(link_t *link, list_t *list)
     201NO_TRACE static inline void list_prepend(link_t *link, list_t *list)
    197202{
    198203        list_insert_after(link, &list->head);
     
    207212 *
    208213 */
    209 static inline void list_append(link_t *link, list_t *list)
     214NO_TRACE static inline void list_append(link_t *link, list_t *list)
    210215{
    211216        list_insert_before(link, &list->head);
     
    220225 *
    221226 */
    222 static inline void list_remove(link_t *link)
     227NO_TRACE static inline void list_remove(link_t *link)
    223228{
    224229        if ((link->prev != NULL) && (link->next != NULL)) {
     
    237242 *
    238243 */
    239 static inline bool list_empty(const list_t *list)
     244NO_TRACE static inline bool list_empty(const list_t *list)
    240245{
    241246        return (list->head.next == &list->head);
     
    274279 *
    275280 * @return Next item or NULL if @a link is the last item.
    276  *
    277281 */
    278282static inline link_t *list_next(const link_t *link, const list_t *list)
     
    287291 *
    288292 * @return Previous item or NULL if @a link is the first item.
    289  *
    290293 */
    291294static inline link_t *list_prev(const link_t *link, const list_t *list)
     
    307310 *
    308311 */
    309 static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)
     312NO_TRACE static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)
    310313{
    311314        part1->prev->next = part2;
     
    328331 *
    329332 */
    330 static inline void headless_list_split(link_t *part1, link_t *part2)
     333NO_TRACE static inline void headless_list_split(link_t *part1, link_t *part2)
    331334{
    332335        headless_list_split_or_concat(part1, part2);
     
    343346 *
    344347 */
    345 static inline void headless_list_concat(link_t *part1, link_t *part2)
     348NO_TRACE static inline void headless_list_concat(link_t *part1, link_t *part2)
    346349{
    347350        headless_list_split_or_concat(part1, part2);
     351}
     352
     353/** Concatenate two lists
     354 *
     355 * Concatenate lists @a list1 and @a list2, producing a single
     356 * list @a list1 containing items from both (in @a list1, @a list2
     357 * order) and empty list @a list2.
     358 *
     359 * @param list1         First list and concatenated output
     360 * @param list2         Second list and empty output.
     361 *
     362 */
     363NO_TRACE static inline void list_concat(list_t *list1, list_t *list2)
     364{
     365        list_splice(list2, list1->head.prev);
    348366}
    349367
     
    396414}
    397415
    398 extern bool list_member(const link_t *, const list_t *);
    399 extern void list_concat(list_t *, list_t *);
    400 extern unsigned long list_count(const list_t *);
    401 
    402416#endif
    403417
  • uspace/lib/c/include/as.h

    rdbf32b1 r95c675b  
    3636#define LIBC_AS_H_
    3737
    38 #include <libarch/types.h>
     38#include <types/common.h>
    3939#include <stddef.h>
    4040#include <stdint.h>
  • uspace/lib/c/include/async.h

    rdbf32b1 r95c675b  
    166166    sysarg_t, async_port_handler_t, void *, port_id_t *);
    167167
    168 extern int async_irq_subscribe(int, int, async_notification_handler_t, void *,
     168extern int async_irq_subscribe(int, async_notification_handler_t, void *,
    169169    const irq_code_t *);
    170 extern int async_irq_unsubscribe(int, int);
     170extern int async_irq_unsubscribe(int);
    171171
    172172extern int async_event_subscribe(event_type_t, async_notification_handler_t,
     
    343343    sysarg_t *, sysarg_t *);
    344344
    345 extern async_sess_t *async_clone_establish(exch_mgmt_t, async_exch_t *);
    346345extern async_sess_t *async_connect_me_to(exch_mgmt_t, async_exch_t *, sysarg_t,
    347346    sysarg_t, sysarg_t);
     
    472471    sysarg_t, sysarg_t, sysarg_t, ipc_call_t *);
    473472
    474 extern int async_exchange_clone(async_exch_t *, async_exch_t *);
    475 extern async_sess_t *async_clone_receive(exch_mgmt_t);
    476473extern async_sess_t *async_callback_receive(exch_mgmt_t);
    477474extern async_sess_t *async_callback_receive_start(exch_mgmt_t, ipc_call_t *);
  • uspace/lib/c/include/atomicdflt.h

    rdbf32b1 r95c675b  
    4040#endif
    4141
    42 #include <stdint.h>
     42#include <types/common.h>
    4343#include <stdbool.h>
    4444
  • uspace/lib/c/include/bd.h

    rdbf32b1 r95c675b  
    3737
    3838#include <async.h>
    39 #include <sys/types.h>
     39#include <offset.h>
    4040
    4141typedef struct {
  • uspace/lib/c/include/bd_srv.h

    rdbf32b1 r95c675b  
    4040#include <fibril_synch.h>
    4141#include <stdbool.h>
    42 #include <sys/types.h>
     42#include <offset.h>
    4343
    4444typedef struct bd_ops bd_ops_t;
  • uspace/lib/c/include/cap.h

    rdbf32b1 r95c675b  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2015 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3030 * @{
    3131 */
    32 /** @file
     32/**
     33 * @file Storage capacity specification.
    3334 */
    3435
    35 #ifndef LIB_CAP_H_
    36 #define LIB_CAP_H_
     36#ifndef LIBC_CAP_H_
     37#define LIBC_CAP_H_
    3738
    38 #include <task.h>
     39#include <adt/list.h>
     40#include <loc.h>
     41#include <stdint.h>
     42#include <types/label.h>
     43#include <types/vol.h>
     44#include <vbd.h>
    3945
    40 extern int cap_grant(task_id_t id, unsigned int caps);
    41 extern int cap_revoke(task_id_t id, unsigned int caps);
     46/** Capacity unit */
     47typedef enum {
     48        cu_byte = 0,
     49        cu_kbyte,
     50        cu_mbyte,
     51        cu_gbyte,
     52        cu_tbyte,
     53        cu_pbyte,
     54        cu_ebyte,
     55        cu_zbyte,
     56        cu_ybyte
     57} cap_unit_t;
     58
     59/** Which of values within the precision of the capacity */
     60typedef enum {
     61        /** The nominal (middling) value */
     62        cv_nom,
     63        /** The minimum value */
     64        cv_min,
     65        /** The maximum value */
     66        cv_max
     67} cap_vsel_t;
     68
     69#define CU_LIMIT (cu_ybyte + 1)
     70
     71/** Storage capacity.
     72 *
     73 * Storage capacity represents both value and precision.
     74 * It is a decimal floating point value combined with a decimal
     75 * capacity unit. There is an integer mantisa @c m which in combination
     76 * with the number of decimal positions @c dp gives a decimal floating-point
     77 * number. E.g. for m = 1025 and dp = 2 the number is 10.25. If the unit
     78 * cunit = cu_kbyte, the capacity is 10.25 kByte, i.e. 10 250 bytes.
     79 *
     80 * Note that 1.000 kByte is equivalent to 1000 Byte, but 1 kByte is less
     81 * precise.
     82 */
     83typedef struct {
     84        /** Mantisa */
     85        uint64_t m;
     86        /** Decimal positions */
     87        unsigned dp;
     88        /** Capacity unit */
     89        cap_unit_t cunit;
     90} cap_spec_t;
     91
     92extern int cap_format(cap_spec_t *, char **);
     93extern int cap_parse(const char *, cap_spec_t *);
     94extern void cap_simplify(cap_spec_t *);
     95extern void cap_from_blocks(uint64_t, size_t, cap_spec_t *);
     96extern int cap_to_blocks(cap_spec_t *, cap_vsel_t, size_t, uint64_t *);
    4297
    4398#endif
  • uspace/lib/c/include/corecfg.h

    rdbf32b1 r95c675b  
    3333 */
    3434
    35 #ifndef LIBC_INET_INETCFG_H_
    36 #define LIBC_INET_INETCFG_H_
     35#ifndef LIBC_CORECFG_H_
     36#define LIBC_CORECFG_H_
    3737
    3838#include <stdbool.h>
  • uspace/lib/c/include/device/hw_res.h

    rdbf32b1 r95c675b  
    5252        HW_RES_GET_RESOURCE_LIST = 0,
    5353        HW_RES_ENABLE_INTERRUPT,
     54        HW_RES_DISABLE_INTERRUPT,
     55        HW_RES_CLEAR_INTERRUPT,
    5456        HW_RES_DMA_CHANNEL_SETUP,
    5557        HW_RES_DMA_CHANNEL_REMAIN,
     
    115117
    116118extern int hw_res_get_resource_list(async_sess_t *, hw_resource_list_t *);
    117 extern bool hw_res_enable_interrupt(async_sess_t *);
     119extern int hw_res_enable_interrupt(async_sess_t *, int);
     120extern int hw_res_disable_interrupt(async_sess_t *, int);
     121extern int hw_res_clear_interrupt(async_sess_t *, int);
    118122
    119123extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t,
  • uspace/lib/c/include/dirent.h

    rdbf32b1 r95c675b  
    3838#define NAME_MAX  256
    3939
    40 #include <sys/types.h>
     40#include <offset.h>
    4141
    4242struct dirent {
  • uspace/lib/c/include/elf/elf.h

    rdbf32b1 r95c675b  
    3737
    3838#include <stdint.h>
    39 #include <libarch/types.h>
     39#include <types/common.h>
    4040#include <abi/elf.h>
    4141#include <libarch/elf.h>
  • uspace/lib/c/include/fibril.h

    rdbf32b1 r95c675b  
    3737
    3838#include <libarch/fibril.h>
     39#include <types/common.h>
    3940#include <adt/list.h>
    4041#include <libarch/tls.h>
  • uspace/lib/c/include/fibril_synch.h

    rdbf32b1 r95c675b  
    173173extern fibril_timer_state_t fibril_timer_clear(fibril_timer_t *);
    174174extern fibril_timer_state_t fibril_timer_clear_locked(fibril_timer_t *);
     175extern void fibril_usleep(useconds_t);
     176extern void fibril_sleep(unsigned int);
    175177
    176178#endif
  • uspace/lib/c/include/fourcc.h

    rdbf32b1 r95c675b  
    11/*
    2  * Copyright (c) 2006 Ondrej Palkovsky
     2 * Copyright (c) 2017 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    3333 */
    3434
    35 #ifndef LIBC_ERR_H_
    36 #define LIBC_ERR_H_
     35#ifndef LIBC_FOURCC_H_
     36#define LIBC_FOURCC_H_
    3737
    38 #include <stdio.h>
     38#include <stdint.h>
    3939
    40 #define errx(status, fmt, ...) \
    41         do { \
    42                 printf((fmt), ##__VA_ARGS__); \
    43                 exit(status); \
    44         } while (0)
     40typedef uint32_t fourcc_t;
    4541
    4642#endif
  • uspace/lib/c/include/gsort.h

    rdbf32b1 r95c675b  
    4242
    4343extern bool gsort(void *, size_t, size_t, sort_cmp_t, void *);
    44 extern bool qsort(void *, size_t, size_t, sort_cmp_t, void *);
    4544
    4645#endif
  • uspace/lib/c/include/inet/dhcp.h

    rdbf32b1 r95c675b  
    3636#define LIBC_INET_DHCP_H_
    3737
     38#include <types/common.h>
    3839
    3940extern int dhcp_init(void);
  • uspace/lib/c/include/inet/udp.h

    rdbf32b1 r95c675b  
    9595extern int udp_assoc_create(udp_t *, inet_ep2_t *, udp_cb_t *, void *,
    9696    udp_assoc_t **);
     97extern int udp_assoc_set_nolocal(udp_assoc_t *);
    9798extern void udp_assoc_destroy(udp_assoc_t *);
    9899extern int udp_assoc_send_msg(udp_assoc_t *, inet_ep_t *, void *, size_t);
  • uspace/lib/c/include/io/chardev.h

    rdbf32b1 r95c675b  
    3333#define LIBC_IO_CHARDEV_H_
    3434
    35 #include <libarch/types.h>
     35#include <types/common.h>
    3636#include <async.h>
    3737
  • uspace/lib/c/include/io/chargrid.h

    rdbf32b1 r95c675b  
    3737#define LIBC_IO_CHARGRID_H_
    3838
     39#include <io/charfield.h>
     40#include <types/common.h>
    3941#include <stddef.h>
    40 #include <io/charfield.h>
    4142
    4243typedef enum {
  • uspace/lib/c/include/io/log.h

    rdbf32b1 r95c675b  
    3838#include <inttypes.h>
    3939#include <io/verify.h>
    40 #include <libarch/types.h>
     40#include <types/common.h>
    4141
    4242#include <abi/log.h>
  • uspace/lib/c/include/io/pixelmap.h

    rdbf32b1 r95c675b  
    3838#define LIBC_IO_PIXELMAP_H_
    3939
     40#include <types/common.h>
     41#include <stdbool.h>
    4042#include <stddef.h>
    4143#include <io/pixel.h>
  • uspace/lib/c/include/io/pos_event.h

    rdbf32b1 r95c675b  
    3737#define LIBC_IO_POS_EVENT_H_
    3838
     39#include <types/common.h>
    3940
    4041typedef enum {
  • uspace/lib/c/include/ipc/dev_iface.h

    rdbf32b1 r95c675b  
    3131
    3232#include <malloc.h>
    33 #include <libarch/types.h>
     33#include <types/common.h>
    3434
    3535typedef enum {
  • uspace/lib/c/include/ipc/event.h

    rdbf32b1 r95c675b  
    3737
    3838#include <abi/ipc/event.h>
    39 #include <libarch/types.h>
     39#include <types/common.h>
    4040
    4141extern int ipc_event_subscribe(event_type_t, sysarg_t);
  • uspace/lib/c/include/ipc/irc.h

    rdbf32b1 r95c675b  
    4040typedef enum {
    4141        IRC_ENABLE_INTERRUPT = IPC_FIRST_USER_METHOD,
     42        IRC_DISABLE_INTERRUPT,
    4243        IRC_CLEAR_INTERRUPT
    4344} irc_request_t;
  • uspace/lib/c/include/ipc/irq.h

    rdbf32b1 r95c675b  
    3636#define LIBC_IPC_IRQ_H_
    3737
    38 #include <libarch/types.h>
     38#include <types/common.h>
    3939#include <abi/ddi/irq.h>
    4040
    41 extern int ipc_irq_subscribe(int, int, sysarg_t, const irq_code_t *);
    42 extern int ipc_irq_unsubscribe(int, int);
     41extern int ipc_irq_subscribe(int, sysarg_t, const irq_code_t *);
     42extern int ipc_irq_unsubscribe(int);
    4343
    4444#endif
  • uspace/lib/c/include/ipc/ns.h

    rdbf32b1 r95c675b  
    4040typedef enum {
    4141        NS_PING = IPC_FIRST_USER_METHOD,
     42        NS_REGISTER,
    4243        NS_TASK_WAIT,
    4344        NS_ID_INTRO,
  • uspace/lib/c/include/ipc/services.h

    rdbf32b1 r95c675b  
    4747        SERVICE_LOGGER     = FOURCC('l', 'o', 'g', 'g'),
    4848        SERVICE_DEVMAN     = FOURCC('d', 'e', 'v', 'n'),
    49         SERVICE_IRC        = FOURCC('i', 'r', 'c', ' '),
    50         SERVICE_CLIPBOARD  = FOURCC('c', 'l', 'i', 'p'),
    5149} service_t;
    5250
     51#define SERVICE_NAME_CLIPBOARD "clipboard"
    5352#define SERVICE_NAME_CORECFG  "corecfg"
    5453#define SERVICE_NAME_DHCP     "net/dhcp"
  • uspace/lib/c/include/ipc/udp.h

    rdbf32b1 r95c675b  
    4242        UDP_ASSOC_CREATE,
    4343        UDP_ASSOC_DESTROY,
     44        UDP_ASSOC_SET_NOLOCAL,
    4445        UDP_ASSOC_SEND_MSG,
    4546        UDP_RMSG_INFO,
  • uspace/lib/c/include/ipc/vol.h

    rdbf32b1 r95c675b  
    3636#include <ipc/common.h>
    3737
     38#define VOL_LABEL_MAXLEN 63
     39
    3840typedef enum {
    3941        VOL_GET_PARTS = IPC_FIRST_USER_METHOD,
     
    4143        VOL_PART_INFO,
    4244        VOL_PART_EMPTY,
    43         VOL_PART_MKFS
     45        VOL_PART_LSUPP,
     46        VOL_PART_MKFS,
    4447} vol_request_t;
    4548
  • uspace/lib/c/include/irc.h

    rdbf32b1 r95c675b  
    3838extern int irc_enable_interrupt(int);
    3939extern int irc_disable_interrupt(int);
     40extern int irc_clear_interrupt(int);
    4041
    4142#endif
  • uspace/lib/c/include/ns.h

    rdbf32b1 r95c675b  
    4646extern int ns_ping(void);
    4747extern int ns_intro(task_id_t);
     48extern async_sess_t *ns_session_get(void);
    4849
    4950#endif
  • uspace/lib/c/include/offset.h

    rdbf32b1 r95c675b  
    11/*
    2  * Copyright (c) 2010 Jiri Svoboda
     2 * Copyright (c) 2017 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    3030 * @{
    3131 */
    32 /** @file Formatting macros for types from sys/types.h and some other
    33  * system types.
     32/** @file
    3433 */
    3534
    36 #ifndef LIBC_SYS_TYPEFMT_H_
    37 #define LIBC_SYS_TYPEFMT_H_
     35#ifndef LIBC_OFFSET_H_
     36#define LIBC_OFFSET_H_
    3837
    39 #include <inttypes.h>
     38#include <stdint.h>
     39
     40/* off64_t */
     41#define OFF64_MIN  INT64_MIN
     42#define OFF64_MAX  INT64_MAX
     43
     44/* aoff64_t */
     45#define AOFF64_MIN  UINT64_MIN
     46#define AOFF64_MAX  UINT64_MAX
    4047
    4148/* off64_t, aoff64_t */
     
    4552#define PRIXOFF64 PRIX64
    4653
     54/** Relative offset */
     55typedef int64_t off64_t;
     56
     57/** Absolute offset */
     58typedef uint64_t aoff64_t;
     59
    4760#endif
    4861
  • uspace/lib/c/include/perm.h

    rdbf32b1 r95c675b  
    2727 */
    2828
    29 /** @addtogroup genericddi
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef KERN_DEVICE_H_
    36 #define KERN_DEVICE_H_
     35#ifndef LIB_PERM_H_
     36#define LIB_PERM_H_
    3737
    38 #include <typedefs.h>
     38#include <task.h>
    3939
    40 extern devno_t device_assign_devno(void);
    41 extern sysarg_t sys_device_assign_devno(void);
     40extern int perm_grant(task_id_t, unsigned int);
     41extern int perm_revoke(task_id_t, unsigned int);
    4242
    4343#endif
  • uspace/lib/c/include/stack.h

    rdbf32b1 r95c675b  
    3636#define LIBC_STACK_H_
    3737
    38 #include <libarch/types.h>
     38#include <types/common.h>
    3939
    4040extern size_t stack_size_get(void);
  • uspace/lib/c/include/stdbool.h

    rdbf32b1 r95c675b  
    3636#define LIBC_BOOL_H_
    3737
    38 #include <libarch/types.h>
    3938#include <abi/bool.h>
    4039
  • uspace/lib/c/include/stddef.h

    rdbf32b1 r95c675b  
    4242#endif
    4343
    44 #define offsetof(type,member) ((size_t) &(((type *) 0)->member))
     44#define offsetof(type, member) \
     45        ((size_t) &(((type *) 0)->member))
    4546
    4647#endif
  • uspace/lib/c/include/stdint.h

    rdbf32b1 r95c675b  
    6262#include <libarch/stdint.h>
    6363
    64 /* off64_t */
    65 #define OFF64_MIN  INT64_MIN
    66 #define OFF64_MAX  INT64_MAX
    67 
    68 /* aoff64_t */
    69 #define AOFF64_MIN  UINT64_MIN
    70 #define AOFF64_MAX  UINT64_MAX
    71 
    7264#endif
    7365
  • uspace/lib/c/include/stdio.h

    rdbf32b1 r95c675b  
    3636#define LIBC_STDIO_H_
    3737
    38 #include <sys/types.h>
    3938#include <stdarg.h>
    4039#include <str.h>
     
    140139extern size_t fwrite(const void *, size_t, size_t, FILE *);
    141140
    142 extern int fseek(FILE *, off64_t, int);
     141extern int fseek(FILE *, long, int);
    143142extern void rewind(FILE *);
    144 extern off64_t ftell(FILE *);
     143extern long ftell(FILE *);
    145144extern int feof(FILE *);
    146145extern int fileno(FILE *);
  • uspace/lib/c/include/stdlib.h

    rdbf32b1 r95c675b  
    3737
    3838#include <malloc.h>
     39#include <qsort.h>
    3940#include <stacktrace.h>
    4041
  • uspace/lib/c/include/str.h

    rdbf32b1 r95c675b  
    9999extern int utf16_to_str(char *dest, size_t size, const uint16_t *src);
    100100extern int str_to_utf16(uint16_t *dest, size_t dlen, const char *src);
     101extern size_t utf16_wsize(const uint16_t *ustr);
    101102
    102103extern char *str_chr(const char *str, wchar_t ch);
  • uspace/lib/c/include/syscall.h

    rdbf32b1 r95c675b  
    4545
    4646#include <abi/syscall.h>
    47 #include <libarch/types.h>
     47#include <types/common.h>
    4848
    4949#define __syscall0  __syscall
  • uspace/lib/c/include/sysinfo.h

    rdbf32b1 r95c675b  
    3636#define LIBC_SYSINFO_H_
    3737
     38#include <types/common.h>
    3839#include <stddef.h>
    3940#include <stdbool.h>
  • uspace/lib/c/include/types/label.h

    rdbf32b1 r95c675b  
    124124} label_pcnt_t;
    125125
     126#define LPC_LIMIT (lpc_minix + 1)
     127
    126128#endif
    127129
  • uspace/lib/c/include/types/vol.h

    rdbf32b1 r95c675b  
    3737
    3838#include <async.h>
     39#include <ipc/vol.h>
     40#include <stdbool.h>
    3941
    4042typedef enum {
     
    7173        /** Filesystem type */
    7274        vol_fstype_t fstype;
     75        /** Volume label */
     76        char label[VOL_LABEL_MAXLEN + 1];
    7377} vol_part_info_t;
     78
     79/** Volume label support */
     80typedef struct {
     81        /** Volume labels are supported */
     82        bool supported;
     83} vol_label_supp_t;
    7484
    7585#endif
  • uspace/lib/c/include/unaligned.h

    rdbf32b1 r95c675b  
    11/*
    2  * Copyright (c) 2006 Josef Cejka
     2 * Copyright (c) 2017 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    3333 */
    3434
    35 #ifndef LIBC_SYS_TYPES_H_
    36 #define LIBC_SYS_TYPES_H_
     35#ifndef LIBC_UNALIGNED_H_
     36#define LIBC_UNALIGNED_H_
    3737
    38 #include <libarch/types.h>
    39 
    40 /** Relative offset */
    41 typedef int64_t off64_t;
    42 
    43 /** Absolute offset */
    44 typedef uint64_t aoff64_t;
    45 
    46 typedef uint32_t fourcc_t;
     38#include <stdint.h>
    4739
    4840typedef int16_t unaligned_int16_t __attribute__ ((aligned(1)));
  • uspace/lib/c/include/vbd.h

    rdbf32b1 r95c675b  
    3939#include <loc.h>
    4040#include <types/label.h>
    41 #include <sys/types.h>
     41#include <offset.h>
    4242
    4343/** VBD service */
  • uspace/lib/c/include/vfs/vfs.h

    rdbf32b1 r95c675b  
    4343#include <stdio.h>
    4444#include <async.h>
     45#include <offset.h>
    4546
    4647#define MAX_OPEN_FILES  128
  • uspace/lib/c/include/vol.h

    rdbf32b1 r95c675b  
    4848extern int vol_part_info(vol_t *, service_id_t, vol_part_info_t *);
    4949extern int vol_part_empty(vol_t *, service_id_t);
    50 extern int vol_part_mkfs(vol_t *, service_id_t, vol_fstype_t);
     50extern int vol_part_get_lsupp(vol_t *, vol_fstype_t, vol_label_supp_t *);
     51extern int vol_part_mkfs(vol_t *, service_id_t, vol_fstype_t, const char *);
    5152
    5253#endif
Note: See TracChangeset for help on using the changeset viewer.