~ubuntu-branches/ubuntu/vivid/ecasound2.2/vivid

« back to all changes in this revision

Viewing changes to kvutils/kvu_rtcaps.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2009-11-02 18:22:35 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091102182235-4ngh7699dmkgonyu
Tags: 2.7.0-1
* New upstream release.
* Depend on libreadline-dev instead of libreadline5-dev by request of
  Mattias Klose. It's now libreadline6-dev. (closes: #553748)
* Update menu file to use section Applications/ instead of Apps/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// ------------------------------------------------------------------------
2
2
// kvu_rtcaps.h: Routines for utilizing POSIX RT extensions.
3
 
// Copyright (C) 2001-2003 Kai Vehmanen
 
3
// Copyright (C) 2001-2003,2009 Kai Vehmanen
4
4
//
5
5
// This program is free software; you can redistribute it and/or modify
6
6
// it under the terms of the GNU General Public License as published by
50
50
    int prev_policy = sched_getscheduler(0);
51
51
    if (prev_policy >= 0) {
52
52
      /* get maximum priority for the tested policy */
53
 
      int max_prio = sched_get_priority_max(policy);
54
 
      if (max_prio >= 0) {
 
53
      int min_prio = sched_get_priority_min(policy);
 
54
      if (min_prio >= 0) {
55
55
        struct sched_param sparam;
56
 
        sparam.sched_priority = max_prio;
 
56
        sparam.sched_priority = min_prio;
57
57
        /* try to change scheduling according the new params */
58
58
        int ret = sched_setscheduler(curpid, policy, &sparam);
59
59
        if (ret == 0) {