Changeset ebb1489 in mainline for uspace/lib/c/include
- Timestamp:
- 2024-10-13T08:23:40Z (19 months ago)
- 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)
- Location:
- uspace/lib/c/include
- Files:
-
- 6 edited
- 1 moved
-
align.h (modified) (2 diffs)
-
dbgcon.h (moved) (moved from uspace/drv/block/ata_bd/main.h ) (2 diffs)
-
ddi.h (modified) (1 diff)
-
device/hw_res.h (modified) (4 diffs)
-
rndgen.h (modified) (1 diff)
-
types/uuid.h (modified) (1 diff)
-
uuid.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/align.h
r2a0c827c rebb1489 41 41 * @param a Size of alignment, must be power of 2. 42 42 */ 43 #define ALIGN_DOWN(s, a) ((s) & ~(( a) - 1))43 #define ALIGN_DOWN(s, a) ((s) & ~((typeof(s))(a) - 1)) 44 44 45 45 /** Align to the nearest higher address which is a power of two. … … 48 48 * @param a Size of alignment, must be power of 2. 49 49 */ 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))) 51 51 52 52 /** Round up to the nearest higher boundary. -
uspace/lib/c/include/dbgcon.h
r2a0c827c rebb1489 1 1 /* 2 * Copyright (c) 20 13Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup ata_bd29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 /** @file ATA driver main module32 /** @file 33 33 */ 34 34 35 #ifndef _ _ATA_MAIN_H__36 #define _ _ATA_MAIN_H__35 #ifndef _LIBC_DBGCON_H_ 36 #define _LIBC_DBGCON_H_ 37 37 38 #include "ata_bd.h"38 #include <stdbool.h> 39 39 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 *); 40 extern bool dbgcon_enable(void); 43 41 44 42 #endif -
uspace/lib/c/include/ddi.h
r2a0c827c rebb1489 47 47 #include <task.h> 48 48 49 #define DMAMEM_1MiB ((uintptr_t) UINT64_C(0xfffffffffff00000)) 49 50 #define DMAMEM_16MiB ((uintptr_t) UINT64_C(0xffffffffff000000)) 50 51 #define DMAMEM_4GiB ((uintptr_t) UINT64_C(0xffffffff00000000)) -
uspace/lib/c/include/device/hw_res.h
r2a0c827c rebb1489 1 1 /* 2 * Copyright (c) 2024 Jiri Svoboda 2 3 * Copyright (c) 2010 Lenka Trochtova 3 4 * All rights reserved. … … 56 57 HW_RES_DMA_CHANNEL_SETUP, 57 58 HW_RES_DMA_CHANNEL_REMAIN, 59 HW_RES_GET_FLAGS 58 60 } hw_res_method_t; 59 61 … … 116 118 } 117 119 120 typedef enum { 121 /** This is an PCI/ISA bridge, not 'classic' ISA bus */ 122 hwf_isa_bridge = 0x1 123 } hw_res_flags_t; 124 118 125 extern errno_t hw_res_get_resource_list(async_sess_t *, hw_resource_list_t *); 119 126 extern errno_t hw_res_enable_interrupt(async_sess_t *, int); … … 124 131 uint32_t, uint8_t); 125 132 extern errno_t hw_res_dma_channel_remain(async_sess_t *, unsigned, size_t *); 133 extern errno_t hw_res_get_flags(async_sess_t *, hw_res_flags_t *); 126 134 127 135 #endif -
uspace/lib/c/include/rndgen.h
r2a0c827c rebb1489 47 47 extern void rndgen_destroy(rndgen_t *); 48 48 extern errno_t rndgen_uint8(rndgen_t *, uint8_t *); 49 extern errno_t rndgen_uint16(rndgen_t *, uint16_t *); 49 50 extern errno_t rndgen_uint32(rndgen_t *, uint32_t *); 50 51 -
uspace/lib/c/include/types/uuid.h
r2a0c827c rebb1489 38 38 #include <stdint.h> 39 39 40 enum { 41 uuid_bytes = 16 42 }; 40 #define _UUID_NODE_LEN 6 43 41 44 42 /** Universally Unique Identifier */ 43 45 44 typedef 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]; 47 51 } uuid_t; 48 52 -
uspace/lib/c/include/uuid.h
r2a0c827c rebb1489 43 43 extern void uuid_encode(uuid_t *, uint8_t *); 44 44 extern void uuid_decode(uint8_t *, uuid_t *); 45 extern void uuid_encode_le(uuid_t *, uint8_t *); 46 extern void uuid_decode_le(uint8_t *, uuid_t *); 45 47 extern errno_t uuid_parse(const char *, uuid_t *, const char **); 46 48 extern errno_t uuid_format(uuid_t *, char **, bool);
Note:
See TracChangeset
for help on using the changeset viewer.
