Changes in / [77cea41:1522b42] in mainline
- Files:
-
- 4 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ddi/irq.h
r77cea41 r1522b42 189 189 extern hash_table_t irq_uspace_hash_table; 190 190 191 extern inr_t last_inr;192 193 191 extern void irq_init(size_t, size_t); 194 192 extern void irq_initialize(irq_t *); -
kernel/generic/src/ddi/irq.c
r77cea41 r1522b42 136 136 static size_t buckets; 137 137 138 /** Last valid INR. */139 inr_t last_inr = 0;140 141 138 /** Initialize IRQ subsystem. 142 139 * … … 148 145 { 149 146 buckets = chains; 150 last_inr = inrs - 1;151 152 147 /* 153 148 * Be smart about the choice of the hash table operations. -
kernel/generic/src/ipc/irq.c
r77cea41 r1522b42 131 131 /** Register an answerbox as a receiving end for IRQ notifications. 132 132 * 133 * @param box Receiving answerbox. 134 * @param inr IRQ number. 135 * @param devno Device number. 136 * @param imethod Interface and method to be associated with the 137 * notification. 138 * @param ucode Uspace pointer to top-half pseudocode. 139 * @return EOK on success or a negative error code. 133 * @param box Receiving answerbox. 134 * @param inr IRQ number. 135 * @param devno Device number. 136 * @param imethod Interface and method to be associated 137 * with the notification. 138 * @param ucode Uspace pointer to top-half pseudocode. 139 * 140 * @return EBADMEM, ENOENT or EEXISTS on failure or 0 on success. 140 141 * 141 142 */ … … 147 148 (sysarg_t) devno 148 149 }; 149 150 if ((inr < 0) || (inr > last_inr))151 return ELIMIT;152 150 153 151 irq_code_t *code; … … 210 208 /** Unregister task from IRQ notification. 211 209 * 212 * @param box 213 * @param inr 214 * @param devno 215 * @return EOK on success or a negative error code.210 * @param box Answerbox associated with the notification. 211 * @param inr IRQ number. 212 * @param devno Device number. 213 * 216 214 */ 217 215 int ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno) … … 221 219 (sysarg_t) devno 222 220 }; 223 224 if ((inr < 0) || (inr > last_inr))225 return ELIMIT;226 221 227 222 irq_spinlock_lock(&irq_uspace_hash_table_lock, true); -
uspace/app/init/init.c
r77cea41 r1522b42 57 57 #define DEVFS_MOUNT_POINT "/dev" 58 58 59 #define TMPFS_FS_TYPE "tmpfs"60 #define TMPFS_MOUNT_POINT "/tmp"59 #define SCRATCH_FS_TYPE "tmpfs" 60 #define SCRATCH_MOUNT_POINT "/scratch" 61 61 62 62 #define DATA_FS_TYPE "fat" … … 235 235 } 236 236 237 static bool mount_ tmpfs(void)238 { 239 int rc = mount( TMPFS_FS_TYPE, TMPFS_MOUNT_POINT, "", "", 0);240 return mount_report(" Temporary filesystem", TMPFS_MOUNT_POINT,241 TMPFS_FS_TYPE, NULL, rc);237 static bool mount_scratch(void) 238 { 239 int rc = mount(SCRATCH_FS_TYPE, SCRATCH_MOUNT_POINT, "", "", 0); 240 return mount_report("Scratch filesystem", SCRATCH_MOUNT_POINT, 241 SCRATCH_FS_TYPE, NULL, rc); 242 242 } 243 243 … … 271 271 } 272 272 273 mount_ tmpfs();273 mount_scratch(); 274 274 275 275 spawn("/srv/fhc"); -
uspace/app/tester/Makefile
r77cea41 r1522b42 51 51 vfs/vfs1.c \ 52 52 ipc/ping_pong.c \ 53 ipc/register.c \ 54 ipc/connect.c \ 53 55 loop/loop1.c \ 54 56 mm/malloc1.c \ -
uspace/app/tester/tester.c
r77cea41 r1522b42 60 60 #include "vfs/vfs1.def" 61 61 #include "ipc/ping_pong.def" 62 #include "ipc/register.def" 63 #include "ipc/connect.def" 62 64 #include "loop/loop1.def" 63 65 #include "mm/malloc1.def" -
uspace/app/tester/tester.h
r77cea41 r1522b42 77 77 extern const char *test_vfs1(void); 78 78 extern const char *test_ping_pong(void); 79 extern const char *test_register(void); 80 extern const char *test_connect(void); 79 81 extern const char *test_loop1(void); 80 82 extern const char *test_malloc1(void); -
uspace/app/tester/vfs/vfs1.c
r77cea41 r1522b42 40 40 #include "../tester.h" 41 41 42 #define TEST_DIRECTORY "/tmp/testdir" 42 #define FS_TYPE "tmpfs" 43 #define MOUNT_POINT "/tmp" 44 #define OPTIONS "" 45 #define FLAGS 0 46 47 #define TEST_DIRECTORY MOUNT_POINT "/testdir" 43 48 #define TEST_FILE TEST_DIRECTORY "/testfile" 44 49 #define TEST_FILE2 TEST_DIRECTORY "/nextfile" … … 70 75 const char *test_vfs1(void) 71 76 { 72 int rc; 73 if ((rc = mkdir(TEST_DIRECTORY, 0)) != 0) { 74 TPRINTF("rc=%d\n", rc); 77 if (mkdir(MOUNT_POINT, 0) != 0) 75 78 return "mkdir() failed"; 79 TPRINTF("Created directory %s\n", MOUNT_POINT); 80 81 int rc = mount(FS_TYPE, MOUNT_POINT, "", OPTIONS, FLAGS); 82 switch (rc) { 83 case EOK: 84 TPRINTF("Mounted %s on %s\n", FS_TYPE, MOUNT_POINT); 85 break; 86 case EBUSY: 87 TPRINTF("(INFO) Filesystem already mounted on %s\n", MOUNT_POINT); 88 break; 89 default: 90 TPRINTF("(ERR) IPC returned errno %d (is tmpfs loaded?)\n", rc); 91 return "mount() failed"; 76 92 } 93 94 if (mkdir(TEST_DIRECTORY, 0) != 0) 95 return "mkdir() failed"; 77 96 TPRINTF("Created directory %s\n", TEST_DIRECTORY); 78 97 -
uspace/drv/ns8250/ns8250.c
r77cea41 r1522b42 342 342 printf(NAME ": failed to connect to the parent driver of the " 343 343 "device %s.\n", dev->name); 344 ret = dev->parent_phone;344 ret = EPARTY; /* FIXME: use another EC */ 345 345 goto failed; 346 346 } 347 347 348 348 /* Get hw resources. */ 349 ret = get_hw_resources(dev->parent_phone, &hw_resources); 350 if (ret != EOK) { 349 if (!get_hw_resources(dev->parent_phone, &hw_resources)) { 351 350 printf(NAME ": failed to get hw resources for the device " 352 351 "%s.\n", dev->name); 352 ret = EPARTY; /* FIXME: use another EC */ 353 353 goto failed; 354 354 } … … 374 374 printf(NAME ": i/o range assigned to the device " 375 375 "%s is too small.\n", dev->name); 376 ret = E LIMIT;376 ret = EPARTY; /* FIXME: use another EC */ 377 377 goto failed; 378 378 } … … 390 390 printf(NAME ": missing hw resource(s) for the device %s.\n", 391 391 dev->name); 392 ret = E NOENT;392 ret = EPARTY; /* FIXME: use another EC */ 393 393 goto failed; 394 394 } -
uspace/drv/pciintel/pci.c
r77cea41 r1522b42 452 452 static int pci_add_device(device_t *dev) 453 453 { 454 int rc;455 456 454 printf(NAME ": pci_add_device\n"); 457 455 … … 468 466 "parent's driver.\n"); 469 467 delete_pci_bus_data(bus_data); 470 return dev->parent_phone;468 return EPARTY; /* FIXME: use another EC */ 471 469 } 472 470 473 471 hw_resource_list_t hw_resources; 474 472 475 rc = get_hw_resources(dev->parent_phone, &hw_resources); 476 if (rc != EOK) { 473 if (!get_hw_resources(dev->parent_phone, &hw_resources)) { 477 474 printf(NAME ": pci_add_device failed to get hw resources for " 478 475 "the device.\n"); 479 476 delete_pci_bus_data(bus_data); 480 477 ipc_hangup(dev->parent_phone); 481 return rc;478 return EPARTY; /* FIXME: use another EC */ 482 479 } 483 480 -
uspace/lib/c/generic/async_rel.c
r77cea41 r1522b42 239 239 */ 240 240 retry: 241 rel_phone = async_connect_me_to(key_phone, 0, 0, 0);241 rel_phone = ipc_connect_me_to(key_phone, 0, 0, 0); 242 242 if (rel_phone >= 0) { 243 243 /* success, do nothing */ -
uspace/lib/c/generic/device/hw_res.c
r77cea41 r1522b42 38 38 #include <malloc.h> 39 39 40 intget_hw_resources(int dev_phone, hw_resource_list_t *hw_resources)40 bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources) 41 41 { 42 42 sysarg_t count = 0; 43 43 int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), GET_RESOURCE_LIST, &count); 44 44 hw_resources->count = count; 45 if (rc != EOK) 46 return rc; 45 if (EOK != rc) { 46 return false; 47 } 47 48 48 49 size_t size = count * sizeof(hw_resource_t); 49 50 hw_resources->resources = (hw_resource_t *)malloc(size); 50 if (!hw_resources->resources) 51 return ENOMEM; 51 if (NULL == hw_resources->resources) { 52 return false; 53 } 52 54 53 55 rc = async_data_read_start(dev_phone, hw_resources->resources, size); 54 if ( rc != EOK) {56 if (EOK != rc) { 55 57 free(hw_resources->resources); 56 58 hw_resources->resources = NULL; 57 return rc;59 return false; 58 60 } 59 61 60 return EOK;62 return true; 61 63 } 62 64 -
uspace/lib/c/generic/devmap.c
r77cea41 r1522b42 279 279 280 280 if (flags & IPC_FLAG_BLOCKING) { 281 phone = async_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP,281 phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP, 282 282 DEVMAP_CONNECT_TO_DEVICE, handle); 283 283 } else { 284 phone = async_connect_me_to(PHONE_NS, SERVICE_DEVMAP,284 phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, 285 285 DEVMAP_CONNECT_TO_DEVICE, handle); 286 286 } -
uspace/lib/c/generic/fibril_synch.c
r77cea41 r1522b42 139 139 static void _fibril_mutex_unlock_unsafe(fibril_mutex_t *fm) 140 140 { 141 assert(fm->counter <= 0); 141 142 if (fm->counter++ < 0) { 142 143 link_t *tmp; … … 164 165 void fibril_mutex_unlock(fibril_mutex_t *fm) 165 166 { 166 assert(fibril_mutex_is_locked(fm));167 167 futex_down(&async_futex); 168 168 _fibril_mutex_unlock_unsafe(fm); 169 169 futex_up(&async_futex); 170 }171 172 bool fibril_mutex_is_locked(fibril_mutex_t *fm)173 {174 bool locked = false;175 176 futex_down(&async_futex);177 if (fm->counter <= 0)178 locked = true;179 futex_up(&async_futex);180 181 return locked;182 170 } 183 171 … … 242 230 { 243 231 futex_down(&async_futex); 232 assert(frw->readers || (frw->writers == 1)); 244 233 if (frw->readers) { 245 234 if (--frw->readers) { … … 307 296 void fibril_rwlock_read_unlock(fibril_rwlock_t *frw) 308 297 { 309 assert(fibril_rwlock_is_read_locked(frw));310 298 _fibril_rwlock_common_unlock(frw); 311 299 } … … 313 301 void fibril_rwlock_write_unlock(fibril_rwlock_t *frw) 314 302 { 315 assert(fibril_rwlock_is_write_locked(frw));316 303 _fibril_rwlock_common_unlock(frw); 317 }318 319 bool fibril_rwlock_is_read_locked(fibril_rwlock_t *frw)320 {321 bool locked = false;322 323 futex_down(&async_futex);324 if (frw->readers)325 locked = true;326 futex_up(&async_futex);327 328 return locked;329 }330 331 bool fibril_rwlock_is_write_locked(fibril_rwlock_t *frw)332 {333 bool locked = false;334 335 futex_down(&async_futex);336 if (frw->writers) {337 assert(frw->writers == 1);338 locked = true;339 }340 futex_up(&async_futex);341 342 return locked;343 }344 345 bool fibril_rwlock_is_locked(fibril_rwlock_t *frw)346 {347 return fibril_rwlock_is_read_locked(frw) ||348 fibril_rwlock_is_write_locked(frw);349 304 } 350 305 … … 359 314 { 360 315 awaiter_t wdata; 361 362 assert(fibril_mutex_is_locked(fm));363 316 364 317 if (timeout < 0) -
uspace/lib/c/include/device/hw_res.h
r77cea41 r1522b42 95 95 96 96 97 extern int get_hw_resources(int, hw_resource_list_t *); 98 extern bool enable_interrupt(int); 97 bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources); 98 99 bool enable_interrupt(int dev_phone); 99 100 100 101 -
uspace/lib/c/include/fibril_synch.h
r77cea41 r1522b42 105 105 extern bool fibril_mutex_trylock(fibril_mutex_t *); 106 106 extern void fibril_mutex_unlock(fibril_mutex_t *); 107 extern bool fibril_mutex_is_locked(fibril_mutex_t *);108 107 109 108 extern void fibril_rwlock_initialize(fibril_rwlock_t *); … … 112 111 extern void fibril_rwlock_read_unlock(fibril_rwlock_t *); 113 112 extern void fibril_rwlock_write_unlock(fibril_rwlock_t *); 114 extern bool fibril_rwlock_is_read_locked(fibril_rwlock_t *);115 extern bool fibril_rwlock_is_write_locked(fibril_rwlock_t *);116 extern bool fibril_rwlock_is_locked(fibril_rwlock_t *);117 113 118 114 extern void fibril_condvar_initialize(fibril_condvar_t *); -
uspace/lib/packet/generic/packet_server.c
r77cea41 r1522b42 135 135 /** Creates a new packet of dimensions at least as given. 136 136 * 137 * Should be used only when the global data are locked. 138 * 137 139 * @param[in] length The total length of the packet, including the header, 138 140 * the addresses and the data of the packet. … … 151 153 packet_t *packet; 152 154 int rc; 153 154 assert(fibril_mutex_is_locked(&ps_globals.lock));155 155 156 156 // already locked … … 233 233 /** Release the packet and returns it to the appropriate free packet queue. 234 234 * 235 * Should be used only when the global data are locked. 236 * 235 237 * @param[in] packet The packet to be released. 236 238 * … … 240 242 int index; 241 243 int result; 242 243 assert(fibril_mutex_is_locked(&ps_globals.lock));244 244 245 245 for (index = 0; (index < FREE_QUEUES_COUNT - 1) && -
uspace/srv/devman/devman.c
r77cea41 r1522b42 392 392 printf(NAME ": create_root_node\n"); 393 393 394 fibril_rwlock_write_lock(&tree->rwlock);395 394 node = create_dev_node(); 396 395 if (node != NULL) { … … 402 401 tree->root_node = node; 403 402 } 404 fibril_rwlock_write_unlock(&tree->rwlock);405 403 406 404 return node != NULL; … … 465 463 /** Start a driver 466 464 * 465 * The driver's mutex is assumed to be locked. 466 * 467 467 * @param drv The driver's structure. 468 468 * @return True if the driver's task is successfully spawned, false … … 473 473 int rc; 474 474 475 assert(fibril_mutex_is_locked(&drv->driver_mutex));476 477 475 printf(NAME ": start_driver '%s'\n", drv->name); 478 476 … … 869 867 /** Find the device node structure of the device witch has the specified handle. 870 868 * 869 * Device tree's rwlock should be held at least for reading. 870 * 871 871 * @param tree The device tree where we look for the device node. 872 872 * @param handle The handle of the device. … … 876 876 { 877 877 unsigned long key = handle; 878 link_t *link; 879 880 assert(fibril_rwlock_is_locked(&tree->rwlock)); 881 882 link = hash_table_find(&tree->devman_devices, &key); 878 link_t *link = hash_table_find(&tree->devman_devices, &key); 883 879 return hash_table_get_instance(link, node_t, devman_link); 884 880 } … … 936 932 /** Insert new device into device tree. 937 933 * 934 * The device tree's rwlock should be already held exclusively when calling this 935 * function. 936 * 938 937 * @param tree The device tree. 939 938 * @param node The newly added device node. … … 950 949 assert(tree != NULL); 951 950 assert(dev_name != NULL); 952 assert(fibril_rwlock_is_write_locked(&tree->rwlock));953 951 954 952 node->name = dev_name; -
uspace/srv/devmap/devmap.c
r77cea41 r1522b42 46 46 #include <str.h> 47 47 #include <ipc/devmap.h> 48 #include <assert.h>49 48 50 49 #define NAME "devmap" … … 209 208 } 210 209 211 /** Find namespace with given name. */ 210 /** Find namespace with given name. 211 * 212 * The devices_list_mutex should be already held when 213 * calling this function. 214 * 215 */ 212 216 static devmap_namespace_t *devmap_namespace_find_name(const char *name) 213 217 { 214 218 link_t *item; 215 216 assert(fibril_mutex_is_locked(&devices_list_mutex));217 218 219 for (item = namespaces_list.next; item != &namespaces_list; item = item->next) { 219 220 devmap_namespace_t *namespace = … … 228 229 /** Find namespace with given handle. 229 230 * 231 * The devices_list_mutex should be already held when 232 * calling this function. 233 * 230 234 * @todo: use hash table 231 235 * … … 234 238 { 235 239 link_t *item; 236 237 assert(fibril_mutex_is_locked(&devices_list_mutex));238 239 240 for (item = namespaces_list.next; item != &namespaces_list; item = item->next) { 240 241 devmap_namespace_t *namespace = … … 247 248 } 248 249 249 /** Find device with given name. */ 250 /** Find device with given name. 251 * 252 * The devices_list_mutex should be already held when 253 * calling this function. 254 * 255 */ 250 256 static devmap_device_t *devmap_device_find_name(const char *ns_name, 251 257 const char *name) 252 258 { 253 259 link_t *item; 254 255 assert(fibril_mutex_is_locked(&devices_list_mutex));256 257 260 for (item = devices_list.next; item != &devices_list; item = item->next) { 258 261 devmap_device_t *device = … … 268 271 /** Find device with given handle. 269 272 * 273 * The devices_list_mutex should be already held when 274 * calling this function. 275 * 270 276 * @todo: use hash table 271 277 * … … 274 280 { 275 281 link_t *item; 276 277 assert(fibril_mutex_is_locked(&devices_list_mutex));278 279 282 for (item = devices_list.next; item != &devices_list; item = item->next) { 280 283 devmap_device_t *device = … … 287 290 } 288 291 289 /** Create a namespace (if not already present). */ 292 /** Create a namespace (if not already present) 293 * 294 * The devices_list_mutex should be already held when 295 * calling this function. 296 * 297 */ 290 298 static devmap_namespace_t *devmap_namespace_create(const char *ns_name) 291 299 { 292 devmap_namespace_t *namespace; 293 294 assert(fibril_mutex_is_locked(&devices_list_mutex)); 295 296 namespace = devmap_namespace_find_name(ns_name); 300 devmap_namespace_t *namespace = devmap_namespace_find_name(ns_name); 297 301 if (namespace != NULL) 298 302 return namespace; … … 319 323 } 320 324 321 /** Destroy a namespace (if it is no longer needed). */ 325 /** Destroy a namespace (if it is no longer needed) 326 * 327 * The devices_list_mutex should be already held when 328 * calling this function. 329 * 330 */ 322 331 static void devmap_namespace_destroy(devmap_namespace_t *namespace) 323 332 { 324 assert(fibril_mutex_is_locked(&devices_list_mutex));325 326 333 if (namespace->refcnt == 0) { 327 334 list_remove(&(namespace->namespaces)); … … 332 339 } 333 340 334 /** Increase namespace reference count by including device. */ 341 /** Increase namespace reference count by including device 342 * 343 * The devices_list_mutex should be already held when 344 * calling this function. 345 * 346 */ 335 347 static void devmap_namespace_addref(devmap_namespace_t *namespace, 336 348 devmap_device_t *device) 337 349 { 338 assert(fibril_mutex_is_locked(&devices_list_mutex));339 340 350 device->namespace = namespace; 341 351 namespace->refcnt++; 342 352 } 343 353 344 /** Decrease namespace reference count. */ 354 /** Decrease namespace reference count 355 * 356 * The devices_list_mutex should be already held when 357 * calling this function. 358 * 359 */ 345 360 static void devmap_namespace_delref(devmap_namespace_t *namespace) 346 361 { 347 assert(fibril_mutex_is_locked(&devices_list_mutex));348 349 362 namespace->refcnt--; 350 363 devmap_namespace_destroy(namespace); 351 364 } 352 365 353 /** Unregister device and free it. */ 366 /** Unregister device and free it 367 * 368 * The devices_list_mutex should be already held when 369 * calling this function. 370 * 371 */ 354 372 static void devmap_device_unregister_core(devmap_device_t *device) 355 373 { 356 assert(fibril_mutex_is_locked(&devices_list_mutex));357 358 374 devmap_namespace_delref(device->namespace); 359 375 list_remove(&(device->devices)); -
uspace/srv/fs/devfs/devfs_ops.c
r77cea41 r1522b42 60 60 typedef struct { 61 61 devmap_handle_t handle; 62 int phone; /**< When < 0, the structure is incomplete. */62 int phone; 63 63 size_t refcount; 64 64 link_t link; 65 fibril_condvar_t cv; /**< Broadcast when completed. */66 65 } device_t; 67 66 … … 228 227 [DEVICES_KEY_HANDLE] = (unsigned long) node->handle 229 228 }; 230 link_t *lnk; 231 229 232 230 fibril_mutex_lock(&devices_mutex); 233 restart: 234 lnk = hash_table_find(&devices, key); 231 link_t *lnk = hash_table_find(&devices, key); 235 232 if (lnk == NULL) { 236 233 device_t *dev = (device_t *) malloc(sizeof(device_t)); … … 240 237 } 241 238 242 dev->handle = node->handle;243 dev->phone = -1; /* mark as incomplete */244 dev->refcount = 1;245 fibril_condvar_initialize(&dev->cv);246 247 /*248 * Insert the incomplete device structure so that other249 * fibrils will not race with us when we drop the mutex250 * below.251 */252 hash_table_insert(&devices, key, &dev->link);253 254 /*255 * Drop the mutex to allow recursive devfs requests.256 */257 fibril_mutex_unlock(&devices_mutex);258 259 239 int phone = devmap_device_connect(node->handle, 0); 260 261 fibril_mutex_lock(&devices_mutex);262 263 /*264 * Notify possible waiters about this device structure265 * being completed (or destroyed).266 */267 fibril_condvar_broadcast(&dev->cv);268 269 240 if (phone < 0) { 270 /*271 * Connecting failed, need to remove the272 * entry and free the device structure.273 */274 hash_table_remove(&devices, key, DEVICES_KEYS);275 241 fibril_mutex_unlock(&devices_mutex); 276 277 242 free(dev); 278 243 return ENOENT; 279 244 } 280 245 281 /* Set the correct phone. */246 dev->handle = node->handle; 282 247 dev->phone = phone; 248 dev->refcount = 1; 249 250 hash_table_insert(&devices, key, &dev->link); 283 251 } else { 284 252 device_t *dev = hash_table_get_instance(lnk, device_t, link); 285 286 if (dev->phone < 0) {287 /*288 * Wait until the device structure is completed289 * and start from the beginning as the device290 * structure might have entirely disappeared291 * while we were not holding the mutex in292 * fibril_condvar_wait().293 */294 fibril_condvar_wait(&dev->cv, &devices_mutex);295 goto restart;296 }297 298 253 dev->refcount++; 299 254 } … … 609 564 610 565 device_t *dev = hash_table_get_instance(lnk, device_t, link); 611 assert(dev->phone >= 0);612 566 613 567 ipc_callid_t callid; … … 673 627 674 628 device_t *dev = hash_table_get_instance(lnk, device_t, link); 675 assert(dev->phone >= 0);676 629 677 630 ipc_callid_t callid; … … 743 696 744 697 device_t *dev = hash_table_get_instance(lnk, device_t, link); 745 assert(dev->phone >= 0);746 698 dev->refcount--; 747 699 … … 791 743 792 744 device_t *dev = hash_table_get_instance(lnk, device_t, link); 793 assert(dev->phone >= 0);794 745 795 746 /* Make a request at the driver */ -
uspace/srv/net/tl/tcp/tcp.c
r77cea41 r1522b42 2085 2085 if (!fibril) { 2086 2086 free(operation_timeout); 2087 return ENOMEM; 2088 } 2089 2087 return EPARTY; /* FIXME: use another EC */ 2088 } 2090 2089 // fibril_mutex_lock(&socket_data->operation.mutex); 2091 2090 /* Start the timeout fibril */ -
uspace/srv/vfs/vfs_lookup.c
r77cea41 r1522b42 179 179 fibril_mutex_unlock(&plb_mutex); 180 180 181 if (( int) rc < EOK)181 if (((int) rc < EOK) || (!result)) 182 182 return (int) rc; 183 184 if (!result)185 return EOK;186 183 187 184 result->triplet.fs_handle = (fs_handle_t) rc;
Note:
See TracChangeset
for help on using the changeset viewer.