Changeset e89a06a in mainline for uspace/lib/c/generic/loc.c
- Timestamp:
- 2018-07-06T22:13:20Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- be0f5e4
- Parents:
- 6419c6e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/loc.c
r6419c6e re89a06a 48 48 static bool loc_callback_created = false; 49 49 static loc_cat_change_cb_t cat_change_cb = NULL; 50 static void *cat_change_arg = NULL; 50 51 51 52 static async_sess_t *loc_supp_block_sess = NULL; … … 70 71 fibril_mutex_lock(&loc_callback_mutex); 71 72 loc_cat_change_cb_t cb_fun = cat_change_cb; 73 void *cb_arg = cat_change_arg; 72 74 fibril_mutex_unlock(&loc_callback_mutex); 73 75 … … 75 77 76 78 if (cb_fun != NULL) 77 (*cb_fun)( );79 (*cb_fun)(cb_arg); 78 80 79 81 break; … … 859 861 } 860 862 861 errno_t loc_register_cat_change_cb(loc_cat_change_cb_t cb_fun )863 errno_t loc_register_cat_change_cb(loc_cat_change_cb_t cb_fun, void *cb_arg) 862 864 { 863 865 fibril_mutex_lock(&loc_callback_mutex); 866 if (cat_change_cb != NULL) { 867 fibril_mutex_unlock(&loc_callback_mutex); 868 return EEXIST; 869 } 870 864 871 if (loc_callback_create() != EOK) { 865 872 fibril_mutex_unlock(&loc_callback_mutex); … … 868 875 869 876 cat_change_cb = cb_fun; 877 cat_change_arg = cb_arg; 870 878 fibril_mutex_unlock(&loc_callback_mutex); 871 879
Note:
See TracChangeset
for help on using the changeset viewer.