scheduler.hh (13125:2488fd19b643) | scheduler.hh (13133:41d8cd260825) |
---|---|
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 --- 168 unchanged lines hidden (view full) --- 177 void dontInitialize(Process *p); 178 179 // Run the next process, if there is one. 180 void yield(); 181 182 // Put a process on the ready list. 183 void ready(Process *p); 184 | 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 --- 168 unchanged lines hidden (view full) --- 177 void dontInitialize(Process *p); 178 179 // Run the next process, if there is one. 180 void yield(); 181 182 // Put a process on the ready list. 183 void ready(Process *p); 184 |
185 // Mark a process as ready if init is finished, or put it on the list of 186 // processes to be initialized. 187 void resume(Process *p); 188 189 // Remove a process from the ready/init list if it was on one of them, and 190 // return if it was. 191 bool suspend(Process *p); 192 |
|
185 // Schedule an update for a given channel. 186 void requestUpdate(Channel *c); 187 188 // Run the given process immediately, preempting whatever may be running. 189 void 190 runNow(Process *p) 191 { 192 // If a process is running, schedule it/us to run again. --- 222 unchanged lines hidden --- | 193 // Schedule an update for a given channel. 194 void requestUpdate(Channel *c); 195 196 // Run the given process immediately, preempting whatever may be running. 197 void 198 runNow(Process *p) 199 { 200 // If a process is running, schedule it/us to run again. --- 222 unchanged lines hidden --- |