Changeset 09ab0a9a in mainline for kernel/generic/src/synch
- Timestamp:
- 2018-09-13T12:05:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc74cb5
- Parents:
- b2aaaa0
- git-author:
- Jiri Svoboda <jiri@…> (2018-09-13 07:09:46)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-09-13 12:05:53)
- Location:
- kernel/generic/src/synch
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/condvar.c
rb2aaaa0 r09ab0a9a 189 189 } 190 190 191 192 191 /** @} 193 192 */ -
kernel/generic/src/synch/futex.c
rb2aaaa0 r09ab0a9a 94 94 } futex_ptr_t; 95 95 96 97 96 static void destroy_task_cache(work_t *work); 98 97 … … 116 115 static bool task_fut_ht_equal(const cht_link_t *item1, const cht_link_t *item2); 117 116 static bool task_fut_ht_key_equal(void *key, const cht_link_t *item); 118 119 117 120 118 /** Mutex protecting the global futex hash table. … … 226 224 } 227 225 228 229 226 /** Initialize the kernel futex structure. 230 227 * … … 284 281 return get_and_cache_futex(paddr, uaddr); 285 282 } 286 287 283 288 284 /** Finds the physical address of the futex variable. */ … … 331 327 return futex; 332 328 } 333 334 329 335 330 /** … … 448 443 } 449 444 450 451 445 /** Return the hash of the key stored in the item */ 452 446 size_t futex_ht_hash(const ht_link_t *item) -
kernel/generic/src/synch/rcu.c
rb2aaaa0 r09ab0a9a 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 28 30 29 /** @addtogroup sync … … 247 246 } rcu_data_t; 248 247 249 250 248 static rcu_data_t rcu; 251 249 … … 294 292 static void upd_max_cbs_in_slice(size_t arriving_cbs_cnt); 295 293 296 297 298 294 /** Initializes global RCU structures. */ 299 295 void rcu_init(void) … … 394 390 link_initialize(&thread->rcu.preempt_link); 395 391 } 396 397 392 398 393 /** Cleans up global RCU resources and stops dispatching callbacks. … … 715 710 return cur_cbs_empty() && next_cbs_empty() && arriving_cbs_empty(); 716 711 } 717 718 712 719 713 /** Reclaimer thread dispatches locally queued callbacks once a GP ends. */ … … 918 912 return expedite; 919 913 } 920 921 914 922 915 #ifdef RCU_PREEMPT_A … … 1291 1284 } 1292 1285 1293 1294 1286 /** The detector thread detects and notifies reclaimers of grace period ends. */ 1295 1287 static void detector(void *arg) … … 1337 1329 return !interrupted; 1338 1330 } 1339 1340 1331 1341 1332 static void end_cur_gp(void) … … 1608 1599 } 1609 1600 } 1610 1611 1601 1612 1602 #endif /* RCU_PREEMPT_PODZIMEK */ -
kernel/generic/src/synch/smp_memory_barrier.c
rb2aaaa0 r09ab0a9a 40 40 #include <config.h> 41 41 42 43 42 static void issue_mem_bar(void *arg) 44 43 { -
kernel/generic/src/synch/waitq.c
rb2aaaa0 r09ab0a9a 61 61 static void waitq_sleep_timed_out(void *); 62 62 static void waitq_complete_wakeup(waitq_t *); 63 64 63 65 64 /** Initialize wait queue … … 489 488 } 490 489 491 492 490 /** Internal SMP- and IRQ-unsafe version of waitq_wakeup() 493 491 * -
kernel/generic/src/synch/workqueue.c
rb2aaaa0 r09ab0a9a 52 52 #define WORK_ITEM_MAGIC 0xfeec1777U 53 53 54 55 54 struct work_queue { 56 55 /* … … 96 95 }; 97 96 98 99 97 /** Min number of idle workers to keep. */ 100 98 static size_t min_worker_cnt; … … 111 109 static int booting = true; 112 110 113 114 111 typedef struct { 115 112 IRQ_SPINLOCK_DECLARE(lock); … … 121 118 static nonblock_adder_t nonblock_adder; 122 119 123 124 125 120 /** Typedef a worker thread signaling operation prototype. */ 126 121 typedef void (*signal_op_t)(struct work_queue *workq); 127 128 122 129 123 /* Fwd decl. */ … … 790 784 --workq->idle_worker_cnt; 791 785 } 792 793 786 794 787 /** Invoked from thread_ready() right before the thread is woken up. */ … … 888 881 } 889 882 890 891 883 static bool dequeue_add_req(nonblock_adder_t *info, struct work_queue **pworkq) 892 884 { … … 925 917 } 926 918 } 927 928 919 929 920 static void nonblock_init(void)
Note:
See TracChangeset
for help on using the changeset viewer.