Revision 77cb9420

View differences:

include/casyncmodule.h
255 255
     */
256 256
    virtual int sendDirect(cMessage *msg, simtime_t delay, simtime_t duration, cGate *inputgate);
257 257
    //}@
258

  
259

  
260
    /*
261
     *
262
     * Wrapper methods for numberGenerator Method calls
263
     *
264
     */
265

  
266
    inline double uniform(double a, double b, int rng=0) {
267
        return numGen->uniform(a,b,rng);
268
    }
269

  
270
    inline double exponential(double mean, int rng=0) {
271
        return numGen->exponential(mean, rng);
272
    }
273

  
274
    inline double normal(double mean, double stddev, int rng=0) {
275
        return numGen->normal(mean,stddev, rng);
276
    }
277

  
278
    inline double truncnormal(double mean, double stddev, int rng=0) {
279
        return numGen->truncnormal(mean,stddev, rng);
280
    }
281

  
282
    inline double gamma_d(double alpha, double theta, int rng=0) {
283
        return numGen->gamma_d(alpha, theta, rng);
284
    }
285

  
286
    inline double beta(double alpha1, double alpha2, int rng=0) {
287
        return numGen->beta(alpha1,alpha2, rng);
288
    }
289

  
290
    inline double erlang_k(unsigned int k, double mean, int rng=0) {
291
        return numGen->erlang_k(k, mean, rng);
292
    }
293

  
294
    inline double chi_square(unsigned int k, int rng=0) {
295
        return numGen->chi_square(k, rng);
296
    }
297

  
298
    inline double student_t(unsigned int i, int rng=0) {
299
        return numGen->student_t(i, rng);
300
    }
301

  
302
    inline double cauchy(double a, double b, int rng=0) {
303
        return numGen->cauchy(a,b, rng);
304
    }
305

  
306
    inline double triang(double a, double b, double c, int rng=0) {
307
        return numGen->triang(a,b,c, rng);
308
    }
309

  
310
    inline double lognormal(double m, double w, int rng=0) {
311
        return numGen->lognormal(m,w, rng);
312
    }
313

  
314
    inline double weibull(double a, double b, int rng=0) {
315
        return numGen->weibull(a,b, rng);
316
    }
317

  
318
    inline double pareto_shifted(double a, double b, double c, int rng=0) {
319
        return numGen->pareto_shifted(a,b,c, rng);
320
    }
321

  
322
    inline int intuniform(int a, int b, int rng=0) {
323
        return numGen->intuniform(a,b, rng);
324
    }
325

  
326
    inline int bernoulli(double p, int rng=0) {
327
        return numGen->bernoulli(p, rng);
328
    }
329

  
330
    inline int binomial(int n, double p, int rng=0) {
331
        return numGen->binomial(n,p, rng);
332
    }
333

  
334
    inline int geometric(double p, int rng=0) {
335
        return numGen->geometric(p, rng);
336
    }
337

  
338
    inline int negbinomial(int n, double p, int rng=0) {
339
        return numGen->negbinomial(n,p, rng);
340
    }
341

  
342
    inline int poisson(double lambda, int rng=0) {
343
        return numGen->poisson(lambda, rng);
344
    }
345

  
346
    inline long intrand(long r) {
347
        return numGen->intrand(r);
348
    }
349

  
350
    inline double dblrand() {
351
        return numGen->dblrand();
352
    }
353

  
258 354
};
259 355

  
260 356
#endif /* __CASYNCMODULE_H */
src/sim/casyncmodule.cc
245 245

  
246 246
    //
247 247
    // reset message counter
248
    // message 0 is the barriermsg
248 249
    //
249
    scheduledMessageCount = 0;
250
    scheduledMessageCount = 1;
250 251

  
251 252
    executionOrderId = msg->getExecutionOrderId();
252 253

  
src/sim/cscheduler.cc
140 140
            barrier->setSchedulingPriority(msg->getSchedulingPriority());
141 141
            barrier->setParentStartTime(msg->getArrivalTime());
142 142
            barrier->setParentExecutionOrderId(sim->getNextExecutionOrderId(msg));
143
            // Set scheduling order to infinity
144
            barrier->setSchedulingOrderId(UINT_MAX);
143
            // Set scheduling order to 0 (in front of all children)
144
            barrier->setSchedulingOrderId(0);
145 145

  
146 146
            sim->msgQueue.insert(barrier);
147 147
        }
src/sim/cspinningthreadpool.cc
320 320
        threadStates[threadId].data.priority = msg->getSchedulingPriority();
321 321
        threadStates[threadId].data.parentStartTime = msg->getArrivalTime();
322 322
        threadStates[threadId].data.parentExecutionOrderId = msg->getExecutionOrderId();
323
        threadStates[threadId].data.schedulingOrderId = UINT_MAX;
323
        threadStates[threadId].data.schedulingOrderId = 0;
324 324
        threadStates[threadId].data.insertOrder = msg->getInsertOrder();
325 325
#endif
326 326
        AO_store_write(&threadStates[threadId].data.msg, (size_t) msg);

Also available in: Unified diff