Changeset 69146b93 in mainline for uspace/lib/c/generic/stack.c


Ignore:
Timestamp:
2012-11-26T19:02:45Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
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.
Message:

Merged mainline,1723.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/stack.c

    r5d230a30 r69146b93  
    11/*
    2  * Copyright (c) 2011 Martin Sucha
     2 * Copyright (c) 2012 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libext2
     29/** @addtogroup libc
    3030 * @{
    3131 */
    32 /**
    33  * @file
     32/** @file
    3433 */
    3534
    36 #ifndef LIBEXT2_LIBEXT2_BLOCK_GROUP_H_
    37 #define LIBEXT2_LIBEXT2_BLOCK_GROUP_H_
     35#include <stack.h>
     36#include <sysinfo.h>
    3837
    39 #include <block.h>
     38size_t stack_size_get(void)
     39{
     40        static sysarg_t stack_size = 0;
    4041
    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);
    4944
    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}
    6747
    6848/** @}
Note: See TracChangeset for help on using the changeset viewer.