This article introduces the SPARC memory model and atomic instructions, then implements some IBM AIX interfaces for use on the Solaris OS (SPARC Platform Edition).
hi guys.
can we use fread and fwrite with pipes to write data more than PIPE_BUF atomically since they lock FILE object until I/O operation finish? (1 Reply)
Hello,
I need to implement a locking system in C. My problem is how to make the check if the lock file exist and locking it atomic operation.
I want to make something like this:
FILE* lock_fname;
lock_fname = fopen ( "file.lock", "r");
/*check if file exsists*/
if (lock_fname)
{
fclose... (7 Replies)
if I rename a dir
mv dir dir2
Is this operation atomic? Suppose there 100 files in dir, does linux rename them one by one or at once?
In other words, is there a time at which both dir and dir2 exist, with dir has, say 30 files and dir2 has the rest 70 files? (4 Replies)