Sunday, October 26th 2014, 12:01am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

sohoil

Beginner

Date of registration: Aug 26th 2010

Posts: 5

1

Tuesday, January 3rd 2012, 9:43am

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

Tobermory

Beginner

Date of registration: Jan 3rd 2012

Posts: 3

Location: UK

Occupation: Development Engineer

2

Tuesday, January 10th 2012, 1:32pm


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


SEGGER - Marius

Super Moderator

Date of registration: Aug 10th 2011

Posts: 7

3

Thursday, January 19th 2012, 4:30pm

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