Changeset 8f88beb7 in mainline for uspace/lib/c/include
- Timestamp:
- 2012-11-25T21:34:07Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e1a27be
- Parents:
- 150a2718 (diff), 7462674 (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. - Location:
- uspace/lib/c/include
- Files:
-
- 1 added
- 2 edited
- 2 moved
-
ddi.h (modified) (2 diffs)
-
double_to_str.h (moved) (moved from uspace/srv/fs/ext2fs/ext2fs.c ) (2 diffs)
-
ieee_double.h (added)
-
macros.h (modified) (1 diff)
-
stack.h (moved) (moved from uspace/lib/ext2/libext2.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ddi.h
r150a2718 r8f88beb7 54 54 extern int pio_enable(void *, size_t, void **); 55 55 56 typedef void (*trace_fnc)( volatile void *place, uint32_t val,56 typedef void (*trace_fnc)(const volatile void *place, uint32_t val, 57 57 volatile void* base, size_t size, void *data, bool write); 58 58 59 59 extern int pio_trace_enable(void *, size_t, trace_fnc, void *); 60 extern void pio_trace_log( volatile void *, uint32_t val, bool write);60 extern void pio_trace_log(const volatile void *, uint32_t val, bool write); 61 61 extern void pio_trace_disable(void *); 62 62 … … 65 65 extern void pio_write_32(ioport32_t *, uint32_t); 66 66 67 extern uint8_t pio_read_8( ioport8_t *);68 extern uint16_t pio_read_16( ioport16_t *);69 extern uint32_t pio_read_32( ioport32_t *);67 extern uint8_t pio_read_8(const ioport8_t *); 68 extern uint16_t pio_read_16(const ioport16_t *); 69 extern uint32_t pio_read_32(const ioport32_t *); 70 70 71 71 static inline uint8_t pio_change_8( -
uspace/lib/c/include/double_to_str.h
r150a2718 r8f88beb7 1 1 /* 2 * Copyright (c) 2006 Martin Decky 3 * Copyright (c) 2011 Martin Sucha 2 * Copyright (c) 2012 Adam Hraska 4 3 * All rights reserved. 5 4 * … … 28 27 */ 29 28 30 /** @addtogroup fs 31 * @{ 32 */ 29 #ifndef DOUBLE_TO_STR_H_ 30 #define DOUBLE_TO_STR_H_ 33 31 34 /** 35 * @file ext2.c 36 * @brief EXT2 file system driver for HelenOS. 32 #include <unistd.h> 33 34 /** Maximum number of digits double_to_*_str conversion functions produce. 35 * 36 * Both double_to_short_str and double_to_fixed_str generate digits out 37 * of a 64bit unsigned int number representation. The max number of 38 * of digits is therefore 20. Add 1 to help users who forget to reserve 39 * space for a null terminator. 37 40 */ 41 #define MAX_DOUBLE_STR_LEN (20 + 1) 38 42 39 #include "ext2fs.h" 40 #include <ipc/services.h> 41 #include <ns.h> 42 #include <async.h> 43 #include <errno.h> 44 #include <unistd.h> 45 #include <task.h> 46 #include <stdio.h> 47 #include <libfs.h> 48 #include "../../vfs/vfs.h" 43 /** Maximum buffer size needed to store the output of double_to_*_str 44 * functions. 45 */ 46 #define MAX_DOUBLE_STR_BUF_SIZE 21 49 47 50 #define NAME "ext2fs" 48 /* Fwd decl.*/ 49 struct ieee_double_t_tag; 51 50 52 vfs_info_t ext2fs_vfs_info = { 53 .name = NAME, 54 .instance = 0, 55 }; 51 extern int double_to_short_str(struct ieee_double_t_tag, char *, size_t, int *); 52 extern int double_to_fixed_str(struct ieee_double_t_tag, int, int, char *, 53 size_t, int *); 56 54 57 int main(int argc, char **argv) 58 { 59 printf(NAME ": HelenOS EXT2 file system server\n"); 60 61 if (argc == 3) { 62 if (!str_cmp(argv[1], "--instance")) 63 ext2fs_vfs_info.instance = strtol(argv[2], NULL, 10); 64 else { 65 printf(NAME " Unrecognized parameters"); 66 return -1; 67 } 68 } 69 70 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 71 SERVICE_VFS, 0, 0); 72 if (!vfs_sess) { 73 printf(NAME ": failed to connect to VFS\n"); 74 return -1; 75 } 76 77 int rc = ext2fs_global_init(); 78 if (rc != EOK) { 79 printf(NAME ": Failed global initialization\n"); 80 return 1; 81 } 82 83 rc = fs_register(vfs_sess, &ext2fs_vfs_info, &ext2fs_ops, 84 &ext2fs_libfs_ops); 85 if (rc != EOK) { 86 fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc); 87 return 1; 88 } 89 90 printf(NAME ": Accepting connections\n"); 91 task_retval(0); 92 async_manager(); 93 /* not reached */ 94 return 0; 95 } 96 97 /** 98 * @} 99 */ 55 #endif -
uspace/lib/c/include/macros.h
r150a2718 r8f88beb7 38 38 #define min(a, b) ((a) < (b) ? (a) : (b)) 39 39 #define max(a, b) ((a) > (b) ? (a) : (b)) 40 #define abs(a) ((a) >= 0 ? (a) : (-a)) 41 40 42 41 43 #define KiB2SIZE(kb) ((kb) << 10) -
uspace/lib/c/include/stack.h
r150a2718 r8f88beb7 1 1 /* 2 * Copyright (c) 201 1 Martin Sucha2 * Copyright (c) 2012 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib ext229 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 /** 33 * @file 32 /** @file 34 33 */ 35 34 36 #ifndef LIB EXT2_LIBEXT2_H_37 #define LIB EXT2_LIBEXT2_H_35 #ifndef LIBC_STACK_H_ 36 #define LIBC_STACK_H_ 38 37 39 #include "libext2_superblock.h" 40 #include "libext2_block_group.h" 41 #include "libext2_inode.h" 42 #include "libext2_filesystem.h" 43 #include "libext2_directory.h" 38 #include <libarch/types.h> 39 40 extern size_t stack_size_get(void); 44 41 45 42 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
