Changeset ebb1489 in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2024-10-13T08:23:40Z (19 months ago)
Author:
GitHub <noreply@…>
Parents:
2a0c827c (diff), b3b79981 (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.
git-author:
boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
git-committer:
GitHub <noreply@…> (2024-10-13 08:23:40)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

Location:
uspace/lib/c/include
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/align.h

    r2a0c827c rebb1489  
    4141 * @param a             Size of alignment, must be power of 2.
    4242 */
    43 #define ALIGN_DOWN(s, a)        ((s) & ~((a) - 1))
     43#define ALIGN_DOWN(s, a)        ((s) & ~((typeof(s))(a) - 1))
    4444
    4545/** Align to the nearest higher address which is a power of two.
     
    4848 * @param a             Size of alignment, must be power of 2.
    4949 */
    50 #define ALIGN_UP(s, a)          ((long)((s) + ((a) - 1)) & ~((long) (a) - 1))
     50#define ALIGN_UP(s, a)          ((((s) + ((a) - 1)) & ~((typeof(s))(a) - 1)))
    5151
    5252/** Round up to the nearest higher boundary.
  • uspace/lib/c/include/dbgcon.h

    r2a0c827c rebb1489  
    11/*
    2  * Copyright (c) 2013 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup ata_bd
     29/** @addtogroup libc
    3030 * @{
    3131 */
    32 /** @file ATA driver main module
     32/** @file
    3333 */
    3434
    35 #ifndef __ATA_MAIN_H__
    36 #define __ATA_MAIN_H__
     35#ifndef _LIBC_DBGCON_H_
     36#define _LIBC_DBGCON_H_
    3737
    38 #include "ata_bd.h"
     38#include <stdbool.h>
    3939
    40 extern errno_t ata_fun_create(disk_t *);
    41 extern errno_t ata_fun_remove(disk_t *);
    42 extern errno_t ata_fun_unbind(disk_t *);
     40extern bool dbgcon_enable(void);
    4341
    4442#endif
  • uspace/lib/c/include/ddi.h

    r2a0c827c rebb1489  
    4747#include <task.h>
    4848
     49#define DMAMEM_1MiB   ((uintptr_t) UINT64_C(0xfffffffffff00000))
    4950#define DMAMEM_16MiB  ((uintptr_t) UINT64_C(0xffffffffff000000))
    5051#define DMAMEM_4GiB   ((uintptr_t) UINT64_C(0xffffffff00000000))
  • uspace/lib/c/include/device/hw_res.h

    r2a0c827c rebb1489  
    11/*
     2 * Copyright (c) 2024 Jiri Svoboda
    23 * Copyright (c) 2010 Lenka Trochtova
    34 * All rights reserved.
     
    5657        HW_RES_DMA_CHANNEL_SETUP,
    5758        HW_RES_DMA_CHANNEL_REMAIN,
     59        HW_RES_GET_FLAGS
    5860} hw_res_method_t;
    5961
     
    116118}
    117119
     120typedef enum {
     121        /** This is an PCI/ISA bridge, not 'classic' ISA bus */
     122        hwf_isa_bridge = 0x1
     123} hw_res_flags_t;
     124
    118125extern errno_t hw_res_get_resource_list(async_sess_t *, hw_resource_list_t *);
    119126extern errno_t hw_res_enable_interrupt(async_sess_t *, int);
     
    124131    uint32_t, uint8_t);
    125132extern errno_t hw_res_dma_channel_remain(async_sess_t *, unsigned, size_t *);
     133extern errno_t hw_res_get_flags(async_sess_t *, hw_res_flags_t *);
    126134
    127135#endif
  • uspace/lib/c/include/rndgen.h

    r2a0c827c rebb1489  
    4747extern void rndgen_destroy(rndgen_t *);
    4848extern errno_t rndgen_uint8(rndgen_t *, uint8_t *);
     49extern errno_t rndgen_uint16(rndgen_t *, uint16_t *);
    4950extern errno_t rndgen_uint32(rndgen_t *, uint32_t *);
    5051
  • uspace/lib/c/include/types/uuid.h

    r2a0c827c rebb1489  
    3838#include <stdint.h>
    3939
    40 enum {
    41         uuid_bytes = 16
    42 };
     40#define _UUID_NODE_LEN 6
    4341
    4442/** Universally Unique Identifier */
     43
    4544typedef struct {
    46         uint8_t b[uuid_bytes];
     45        uint32_t time_low;
     46        uint16_t time_mid;
     47        uint16_t time_hi_and_version;
     48        uint8_t clock_seq_hi_and_reserved;
     49        uint8_t clock_seq_low;
     50        uint8_t node[_UUID_NODE_LEN];
    4751} uuid_t;
    4852
  • uspace/lib/c/include/uuid.h

    r2a0c827c rebb1489  
    4343extern void uuid_encode(uuid_t *, uint8_t *);
    4444extern void uuid_decode(uint8_t *, uuid_t *);
     45extern void uuid_encode_le(uuid_t *, uint8_t *);
     46extern void uuid_decode_le(uint8_t *, uuid_t *);
    4547extern errno_t uuid_parse(const char *, uuid_t *, const char **);
    4648extern errno_t uuid_format(uuid_t *, char **, bool);
Note: See TracChangeset for help on using the changeset viewer.