Changeset 474


Ignore:
Timestamp:
Dec 12, 2014, 5:54:20 PM (9 years ago)
Author:
alain
Message:

Update the fat32.c file to use a queueing spin-lock.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_fat32/fat32.c

    r458 r474  
    11301130
    11311131    // initalise the lock protecting the FAT
    1132     _lock_init( &fat.fat_lock );
     1132    _spin_lock_init( &fat.fat_lock );
    11331133
    11341134    // initialise file descriptor array
     
    12411241    }
    12421242    // takes the FAT lock for exclusive access
    1243     _lock_acquire( &fat.fat_lock );
     1243    _spin_lock_acquire( &fat.fat_lock );
    12441244
    12451245#if GIET_DEBUG_FAT
     
    12961296            _puts( name );
    12971297            _puts("\n");
    1298             _lock_release( &fat.fat_lock );
     1298            _spin_lock_release( &fat.fat_lock );
    12991299            return -1;
    13001300        }
     
    13511351
    13521352            // release FAT lock
    1353             _lock_release( &fat.fat_lock );
     1353            _spin_lock_release( &fat.fat_lock );
    13541354
    13551355            return fd_id;
     
    13601360            _puts( pathname );
    13611361            _puts(" : fd array full\n");
    1362             _lock_release( &fat.fat_lock );
     1362            _spin_lock_release( &fat.fat_lock );
    13631363            return -1;
    13641364        }
     
    13691369        _puts( pathname );
    13701370        _puts(" : bad cluster\n");
    1371         _lock_release( &fat.fat_lock );
     1371        _spin_lock_release( &fat.fat_lock );
    13721372        return -1;
    13731373    }
Note: See TracChangeset for help on using the changeset viewer.