Lines Matching defs:Packet
51 var queue = new Packet(null, ID_WORKER, KIND_WORK);
52 queue = new Packet(queue, ID_WORKER, KIND_WORK);
55 queue = new Packet(null, ID_DEVICE_A, KIND_DEVICE);
56 queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE);
57 queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE);
60 queue = new Packet(null, ID_DEVICE_B, KIND_DEVICE);
61 queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE);
62 queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE);
83 * These two constants specify how many times a packet is queued and
123 * @param {Packet} queue the queue of work to be processed by the task
134 * @param {Packet} queue the queue of work to be processed by the task
144 * @param {Packet} queue the queue of work to be processed by the task
154 * @param {Packet} queue the queue of work to be processed by the task
164 * @param {Packet} queue the queue of work to be processed by the task
176 * @param {Packet} queue the queue of work to be processed by the task
236 * Add the specified packet to the end of the worklist used by the task
237 * associated with the packet and make the task runnable if it is currently
239 * @param {Packet} packet the packet to add
241 Scheduler.prototype.queue = function (packet) {
242 var t = this.blocks[packet.id];
245 packet.link = null;
246 packet.id = this.currentId;
247 return t.checkPriorityAdd(this.currentTcb, packet);
256 * @param {Packet} queue the queue of packages to be processed by the task
325 var packet;
327 packet = this.queue;
328 this.queue = packet.link;
335 packet = null;
337 return this.task.run(packet);
341 * Adds a packet to the worklist of this block's task, marks this as runnable if
345 TaskControlBlock.prototype.checkPriorityAdd = function (task, packet) {
347 this.queue = packet;
351 this.queue = packet.addTo(this.queue);
374 IdleTask.prototype.run = function (packet) {
401 DeviceTask.prototype.run = function (packet) {
402 if (packet == null) {
408 this.v1 = packet;
430 WorkerTask.prototype.run = function (packet) {
431 if (packet == null) {
439 packet.id = this.v1;
440 packet.a1 = 0;
444 packet.a2[i] = this.v2;
446 return this.scheduler.queue(packet);
465 HandlerTask.prototype.run = function (packet) {
466 if (packet != null) {
467 if (packet.kind == KIND_WORK) {
468 this.v1 = packet.addTo(this.v1);
470 this.v2 = packet.addTo(this.v2);
505 * of the payload data carried by a packet is not importaint, and neither is the
510 * @param {Packet} link the tail of the linked list of packets
511 * @param {int} id an ID for this packet
512 * @param {int} kind the type of this packet
515 function Packet(link, id, kind) {
524 * Add this packet to the end of a worklist, and return the worklist.
525 * @param {Packet} queue the worklist to add this packet to
527 Packet.prototype.addTo = function (queue) {
537 Packet.prototype.toString = function () {
538 return "Packet";