emFile integration with embOs

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • emFile integration with embOs

    Function FS_X_OS_Init() called from FS_Init. According to description user will need to create four binary semaphores.
    Unfortunately it's impossible to change NumLocks parameter of FS_X_OS_Init. it's equal 1 always even FS_OS_LOCKING define is changed for value 2.
    Any solution for me ?

    10x

  • Hi, Sohoil.

    Thought I would recount to you the behaviour of my system in this respect.

    If I build my program using a Multilock version of the File System library. And #define FS_OS_LOCKING as 0 in the file ‘FS_Conf.h’. I see a value of 2 passed into the function FS_X_OS_Init through the argument NumLocks.

    If I change the #define to equate FS_OS_LOCKING to 2. I still see a value of 2 passed into the function FS_X_OS_Init through the argument NumLocks.

    Sorry I cannot be of more help.

    Regards

    Tobermory

  • Hello,

    @Sohoil
    The number of semaphores required is computed by emFile at runtime like this:
    - no locking (FS_OS_LOCKING == 0) -> no semaphores
    - coarse lock granularity (FS_OS_LOCKING == 1) -> 1 semaphore
    - fine lock granularity (FS_OS_LOCKING == 2) -> 1 + <number of drivers> semaphores

    @Tobermory
    When using emFile in library form setting FS_OS_LOCKING has no effect.
    The required level of locking can be selected by linking the appropriate library.
    This is the reason why emFile requires 2 semaphores even if FS_OS_LOCKING is set to 0.

    Best regards,
    Marius