locking file on smp based kernel with multi-threadng

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Our application has logging module. The module writes all the information to a file. The application is a multithreaded application where threads are writing data to an application.

Now our application is going to run on smp based systems. So file locking for processes, i am using the fcntl. Do I need to use thread locking for file. Do i need to use mutex for thread locking ?

Will there be a situation where two threads running on two different processors tries to write to the same logging file ? In that case how do i achive synchronization or it will be taken care by smp kernel itself ?

Thanks in Advance,
Deepak Joshi.


The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux