Changeset 7c3fb9b in mainline for kernel/generic/src
- Timestamp:
- 2018-05-17T08:29:01Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ff23ff
- Parents:
- fac0ac7
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
- Location:
- kernel/generic/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
rfac0ac7 r7c3fb9b 1421 1421 printf("%s (%s)\n", test->name, test->desc); 1422 1422 1423 /* Update and read thread accounting 1424 for benchmarking */ 1423 /* 1424 * Update and read thread accounting 1425 * for benchmarking 1426 */ 1425 1427 irq_spinlock_lock(&TASK->lock, true); 1426 1428 uint64_t ucycles0, kcycles0; … … 1474 1476 printf("%s (%u/%u) ... ", test->name, i + 1, cnt); 1475 1477 1476 /* Update and read thread accounting 1477 for benchmarking */ 1478 /* 1479 * Update and read thread accounting 1480 * for benchmarking 1481 */ 1478 1482 irq_spinlock_lock(&TASK->lock, true); 1479 1483 uint64_t ucycles0, kcycles0; -
kernel/generic/src/ipc/event.c
rfac0ac7 r7c3fb9b 354 354 * @return ELIMIT on unknown event type. 355 355 * @return ENOENT if the notification of the given type is not 356 subscribed. 357 * 356 * subscribed. 358 357 */ 359 358 sys_errno_t sys_ipc_event_unsubscribe(sysarg_t evno) -
kernel/generic/src/ipc/ipc.c
rfac0ac7 r7c3fb9b 33 33 */ 34 34 35 /* Lock ordering 35 /* 36 * Lock ordering 36 37 * 37 38 * First the answerbox, then the phone. -
kernel/generic/src/ipc/ipcrsc.c
rfac0ac7 r7c3fb9b 33 33 */ 34 34 35 /* IPC resources management 35 /* 36 * IPC resources management 36 37 * 37 38 * The goal of this source code is to properly manage IPC resources and allow -
kernel/generic/src/ipc/irq.c
rfac0ac7 r7c3fb9b 514 514 } 515 515 516 /* IRQ top-half handler.516 /** IRQ top-half handler. 517 517 * 518 518 * We expect interrupts to be disabled and the irq->lock already held. -
kernel/generic/src/lib/str.c
rfac0ac7 r7c3fb9b 225 225 return EINVAL; 226 226 227 /* Unsigned version of ch (bit operations should only be done 228 on unsigned types). */ 227 /* 228 * Unsigned version of ch (bit operations should only be done 229 * on unsigned types). 230 */ 229 231 uint32_t cc = (uint32_t) ch; 230 232 … … 735 737 * @param ch Character to insert to. 736 738 * @param pos Character index where to insert. 737 @@param max_pos Characters in the buffer.739 * @param max_pos Characters in the buffer. 738 740 * 739 741 * @return True if the insertion was sucessful, false if the position … … 934 936 return EINVAL; 935 937 936 /* Check whether we are at the end of 937 the string in strict mode */ 938 /* 939 * Check whether we are at the end of 940 * the string in strict mode 941 */ 938 942 if ((strict) && (*lendptr != 0)) 939 943 return EINVAL; -
kernel/generic/src/lib/str_error.c
rfac0ac7 r7c3fb9b 31 31 #include <str.h> 32 32 33 /* The arrays below are automatically generated from the same file that 33 /* 34 * The arrays below are automatically generated from the same file that 34 35 * errno.h constants are generated from. Triple-include of the same list 35 36 * with redefinitions of __errno() macro are used to ensure that the … … 61 62 static int find_errno(errno_t e) 62 63 { 63 /* Just a dumb linear search. 64 /* 65 * Just a dumb linear search. 64 66 * There too few entries to warrant anything smarter. 65 67 */ -
kernel/generic/src/main/main.c
rfac0ac7 r7c3fb9b 95 95 #include <cap/cap.h> 96 96 97 /* Ensure [u]int*_t types are of correct size. 97 /* 98 * Ensure [u]int*_t types are of correct size. 98 99 * 99 100 * Probably, this is not the best place for such tests -
kernel/generic/src/mm/as.c
rfac0ac7 r7c3fb9b 477 477 if (addr >= bound) { 478 478 if (guarded) { 479 /* Leave an unmapped page between the lower 479 /* 480 * Leave an unmapped page between the lower 480 481 * bound and the area's start address. 481 482 */ … … 499 500 500 501 if (guarded || area->flags & AS_AREA_GUARD) { 501 /* We must leave an unmapped page 502 /* 503 * We must leave an unmapped page 502 504 * between the two areas. 503 505 */ -
kernel/generic/src/printf/vsnprintf.c
rfac0ac7 r7c3fb9b 70 70 71 71 if (left == 1) { 72 /* We have only one free byte left in buffer 72 /* 73 * We have only one free byte left in buffer 73 74 * -> store trailing zero 74 75 */ … … 79 80 80 81 if (left <= size) { 81 /* We do not have enough space for the whole string 82 /* 83 * We do not have enough space for the whole string 82 84 * with the trailing zero => print only a part 83 85 * of string … … 92 94 } 93 95 94 /* Put trailing zero at end, but not count it 96 /* 97 * Put trailing zero at end, but not count it 95 98 * into data->len so it could be rewritten next time 96 99 */ … … 104 107 data->len += size; 105 108 106 /* Put trailing zero at end, but not count it 109 /* 110 * Put trailing zero at end, but not count it 107 111 * into data->len so it could be rewritten next time 108 112 */ … … 140 144 141 145 if (left == 1) { 142 /* We have only one free byte left in buffer 146 /* 147 * We have only one free byte left in buffer 143 148 * -> store trailing zero 144 149 */ … … 154 159 } 155 160 156 /* Put trailing zero at end, but not count it 161 /* 162 * Put trailing zero at end, but not count it 157 163 * into data->len so it could be rewritten next time 158 164 */ -
kernel/generic/src/proc/thread.c
rfac0ac7 r7c3fb9b 621 621 void thread_sleep(uint32_t sec) 622 622 { 623 /* Sleep in 1000 second steps to support 624 full argument range */ 623 /* 624 * Sleep in 1000 second steps to support 625 * full argument range 626 */ 625 627 while (sec > 0) { 626 628 uint32_t period = (sec > 1000) ? 1000 : sec; -
kernel/generic/src/synch/waitq.c
rfac0ac7 r7c3fb9b 441 441 THREAD->sleep_queue = wq; 442 442 443 /* Must be before entry to scheduler, because there are multiple 443 /* 444 * Must be before entry to scheduler, because there are multiple 444 445 * return vectors. 445 446 */ -
kernel/generic/src/synch/workqueue.c
rfac0ac7 r7c3fb9b 424 424 * until func() is entered. 425 425 * @param func User supplied function to invoke in a worker thread. 426 426 * 427 427 * @return false if work queue is shutting down; function is not 428 428 * queued for further processing. … … 444 444 * until func() is entered. 445 445 * @param func User supplied function to invoke in a worker thread. 446 446 * 447 447 * @return false if work queue is shutting down; function is not 448 448 * queued for further processing. … … 469 469 * @param func User supplied function to invoke in a worker thread. 470 470 * @param can_block May adding this work item block? 471 471 * 472 472 * @return false if work queue is shutting down; function is not 473 473 * queued for further processing. -
kernel/generic/src/sysinfo/stats.c
rfac0ac7 r7c3fb9b 222 222 } 223 223 224 /* Produce task statistics224 /** Produce task statistics 225 225 * 226 226 * Summarize task information into task statistics. … … 324 324 } 325 325 326 /* Produce thread statistics326 /** Produce thread statistics 327 327 * 328 328 * Summarize thread information into thread statistics. -
kernel/generic/src/sysinfo/sysinfo.c
rfac0ac7 r7c3fb9b 232 232 i++; 233 233 234 /* Check for perfect name and path match 234 /* 235 * Check for perfect name and path match 235 236 * -> item is already present. 236 237 */ … … 251 252 &(cur->subtree.table)); 252 253 default: 253 /* Subtree items handled by a function, this 254 /* 255 * Subtree items handled by a function, this 254 256 * cannot be overriden by a constant item. 255 257 */ … … 258 260 } 259 261 260 /* No match and no more siblings to check 262 /* 263 * No match and no more siblings to check 261 264 * -> create a new sibling item. 262 265 */ … … 457 460 sysinfo_item_t *item = sysinfo_create_path(name, root); 458 461 459 /* Change the type of the subtree only if it is not already 460 a fixed subtree */ 462 /* 463 * Change the type of the subtree only if it is not already 464 * a fixed subtree 465 */ 461 466 if ((item != NULL) && (item->subtree_type != SYSINFO_SUBTREE_TABLE)) { 462 467 item->subtree_type = SYSINFO_SUBTREE_FUNCTION; … … 559 564 void sysinfo_dump(sysinfo_item_t *root) 560 565 { 561 /* Avoid other functions to mess with sysinfo 562 while we are dumping it */ 566 /* 567 * Avoid other functions to mess with sysinfo 568 * while we are dumping it 569 */ 563 570 mutex_lock(&sysinfo_lock); 564 571
Note:
See TracChangeset
for help on using the changeset viewer.