Changeset c046942 in mainline
- Timestamp:
- 2011-12-11T17:20:56Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 277ff98
- Parents:
- 29e479f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/recognise.c
r29e479f rc046942 45 45 #include <errno.h> 46 46 #include <assert.h> 47 48 /** Index to append after device name for uniqueness. */49 static size_t device_name_index = 0;50 /** Mutex guard for device_name_index. */51 static FIBRIL_MUTEX_INITIALIZE(device_name_index_mutex);52 47 53 48 /** DDF operations of child devices. */ … … 329 324 } 330 325 331 fibril_mutex_lock(&device_name_index_mutex); 332 const size_t this_device_name_index = device_name_index++; 333 fibril_mutex_unlock(&device_name_index_mutex); 326 327 /** Index to append after device name for uniqueness. */ 328 static atomic_t device_name_index = {0}; 329 const size_t this_device_name_index = 330 (size_t) atomic_preinc(&device_name_index); 334 331 335 332 ddf_fun_t *child = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.