sc_module.cc (13135:4bb2f323fb1a) sc_module.cc (13146:3539fe351218)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 561 unchanged lines hidden (view full) ---

570 sc_gem5::Process *p = sc_gem5::scheduler.current();
571 p->setDynamic(nullptr);
572 sc_gem5::scheduler.yield();
573}
574
575void
576wait(int n)
577{
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 561 unchanged lines hidden (view full) ---

570 sc_gem5::Process *p = sc_gem5::scheduler.current();
571 p->setDynamic(nullptr);
572 sc_gem5::scheduler.yield();
573}
574
575void
576wait(int n)
577{
578 if (n <= 0) {
579 std::string msg = csprintf("n = %d", n);
580 SC_REPORT_ERROR("(E525) wait(n) is only valid for n > 0", msg.c_str());
581 }
578 for (int i = 0; i < n; i++)
579 wait();
580}
581
582void
583wait(const sc_event &e)
584{
585 sc_gem5::Process *p = sc_gem5::scheduler.current();

--- 144 unchanged lines hidden ---
582 for (int i = 0; i < n; i++)
583 wait();
584}
585
586void
587wait(const sc_event &e)
588{
589 sc_gem5::Process *p = sc_gem5::scheduler.current();

--- 144 unchanged lines hidden ---