Changeset 69146b93 in mainline for uspace/lib/c/generic/stack.c
- Timestamp:
- 2012-11-26T19:02:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04552324
- Parents:
- 5d230a30 (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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/stack.c
r5d230a30 r69146b93 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 #i fndef LIBEXT2_LIBEXT2_BLOCK_GROUP_H_37 # define LIBEXT2_LIBEXT2_BLOCK_GROUP_H_35 #include <stack.h> 36 #include <sysinfo.h> 38 37 39 #include <block.h> 38 size_t stack_size_get(void) 39 { 40 static sysarg_t stack_size = 0; 40 41 41 typedef struct ext2_block_group { 42 uint32_t block_bitmap_block; // Block ID for block bitmap 43 uint32_t inode_bitmap_block; // Block ID for inode bitmap 44 uint32_t inode_table_first_block; // Block ID of first block of inode table 45 uint16_t free_block_count; // Count of free blocks 46 uint16_t free_inode_count; // Count of free inodes 47 uint16_t directory_inode_count; // Number of inodes allocated to directories 48 } ext2_block_group_t; 42 if (!stack_size) 43 sysinfo_get_value("default.stack_size", &stack_size); 49 44 50 typedef struct ext2_block_group_ref { 51 block_t *block; // Reference to a block containing this block group descr 52 ext2_block_group_t *block_group; 53 } ext2_block_group_ref_t; 54 55 #define EXT2_BLOCK_GROUP_DESCRIPTOR_SIZE 32 56 57 extern uint32_t ext2_block_group_get_block_bitmap_block(ext2_block_group_t *); 58 extern uint32_t ext2_block_group_get_inode_bitmap_block(ext2_block_group_t *); 59 extern uint32_t ext2_block_group_get_inode_table_first_block(ext2_block_group_t *); 60 extern uint16_t ext2_block_group_get_free_block_count(ext2_block_group_t *); 61 extern uint16_t ext2_block_group_get_free_inode_count(ext2_block_group_t *); 62 extern uint16_t ext2_block_group_get_directory_inode_count(ext2_block_group_t *); 63 64 extern void ext2_block_group_set_free_block_count(ext2_block_group_t *, uint16_t); 65 66 #endif 45 return (size_t) stack_size; 46 } 67 47 68 48 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.