ARG_KILL,
ARG_USE_PID_FILE,
ARG_CHECK,
+ ARG_NO_CPU_LIMIT,
ARG_SYSTEM
};
{"use-pid-file", 2, 0, ARG_USE_PID_FILE},
{"check", 0, 0, ARG_CHECK},
{"system", 2, 0, ARG_SYSTEM},
+ {"no-cpu-limit", 2, 0, ARG_NO_CPU_LIMIT},
{NULL, 0, 0, 0}
};
" (one of src-sinc-medium-quality,\n"
" src-sinc-best-quality,src-sinc-fastest\n"
" src-zero-order-hold,src-linear,trivial)\n"
- " --use-pid-file[=BOOL] Create a PID file\n\n"
+ " --use-pid-file[=BOOL] Create a PID file\n"
+ " --no-cpu-limit[=BOOL] Do not install CPU load limiter on\n"
+ " platforms that support it.\n\n"
"STARTUP SCRIPT:\n"
" -L, --load=\"MODULE ARGUMENTS\" Load the specified plugin module with\n"
goto fail;
}
break;
+
+ case ARG_NO_CPU_LIMIT:
+ if ((conf->no_cpu_limit = optarg ? pa_parse_boolean(optarg) : 1) < 0) {
+ pa_log(__FILE__": --no-cpu-limit expects boolean argument");
+ goto fail;
+ }
+ break;
+
default:
goto fail;
.resample_method = PA_RESAMPLER_SRC_SINC_FASTEST,
.config_file = NULL,
.use_pid_file = 1,
- .system_instance = 0
+ .system_instance = 0,
+ .no_cpu_limit = 0
#ifdef HAVE_SYS_RESOURCE_H
, .rlimit_as = { .value = 0, .is_set = 0 },
.rlimit_core = { .value = 0, .is_set = 0 },
{ "resample-method", parse_resample_method, NULL },
{ "use-pid-file", pa_config_parse_bool, NULL },
{ "system-instance", pa_config_parse_bool, NULL },
+ { "no-cpu-limit", pa_config_parse_bool, NULL },
#ifdef HAVE_SYS_RESOURCE_H
{ "rlimit-as", parse_rlimit, NULL },
{ "rlimit-core", parse_rlimit, NULL },
table[12].data = c;
table[13].data = &c->use_pid_file;
table[14].data = &c->system_instance;
+ table[15].data = &c->no_cpu_limit;
#ifdef HAVE_SYS_RESOURCE_H
- table[15].data = &c->rlimit_as;
- table[16].data = &c->rlimit_core;
- table[17].data = &c->rlimit_data;
- table[18].data = &c->rlimit_fsize;
- table[19].data = &c->rlimit_nofile;
- table[20].data = &c->rlimit_stack;
+ table[16].data = &c->rlimit_as;
+ table[17].data = &c->rlimit_core;
+ table[18].data = &c->rlimit_data;
+ table[19].data = &c->rlimit_fsize;
+ table[20].data = &c->rlimit_nofile;
+ table[21].data = &c->rlimit_stack;
#ifdef RLIMIT_NPROC
- table[21].data = &c->rlimit_nproc;
+ table[22].data = &c->rlimit_nproc;
#endif
#ifdef RLIMIT_MEMLOCK
#ifndef RLIMIT_NPROC
#error "Houston, we have a numbering problem!"
#endif
- table[22].data = &c->rlimit_memlock;
+ table[23].data = &c->rlimit_memlock;
#endif
#endif
pa_strbuf_printf(s, "resample-method = %s\n", pa_resample_method_to_string(c->resample_method));
pa_strbuf_printf(s, "use-pid-file = %i\n", c->use_pid_file);
pa_strbuf_printf(s, "system-instance = %i\n", !!c->system_instance);
+ pa_strbuf_printf(s, "no-cpu-limit = %i\n", !!c->no_cpu_limit);
#ifdef HAVE_SYS_RESOURCE_H
pa_strbuf_printf(s, "rlimit-as = %li\n", c->rlimit_as.is_set ? (long int) c->rlimit_as.value : -1);
pa_strbuf_printf(s, "rlimit-core = %li\n", c->rlimit_core.is_set ? (long int) c->rlimit_core.value : -1);