search for: max_threads

Displaying 20 results from an estimated 23 matches for "max_threads".

2012 Mar 11
2
[patch] Threading support in ssh-agent
...#include <stdio.h> @@ -88,6 +93,9 @@ AUTH_UNUSED, AUTH_SOCKET, AUTH_CONNECTION +#ifdef HAVE_LIBPTHREAD + , AUTH_INUSE +#endif } sock_type; typedef struct { @@ -137,6 +145,50 @@ /* Default lifetime (0 == forever) */ static int lifetime = 0; +#ifdef HAVE_LIBPTHREAD + +#define MAX_THREADS 20 + +#define REQ_QUEUE_LEN (MAX_THREADS * 2) + +typedef void (*AuthWorker)(SocketEntry*); + +struct AuthRequestQueueEntry { + AuthWorker worker; + SocketEntry *e; +}; + +struct AuthRequestQueue { + struct AuthRequestQueueEntry queue[REQ_QUEUE_LEN]; + int first; + int used; + int inprogress; /* ope...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
..._("unknown long option: %s (%d)"), + long_options[option_index].name, option_index); break; case 'a': @@ -182,11 +179,8 @@ main (int argc, char *argv[]) break; case 'P': - if (sscanf (optarg, "%zu", &max_threads) != 1) { - fprintf (stderr, _("%s: -P option is not numeric\n"), - guestfs_int_program_name); - exit (EXIT_FAILURE); - } + if (sscanf (optarg, "%zu", &max_threads) != 1) + error (EXIT_FAILURE, 0, _("-P option is not numeric...
2020 Feb 13
0
[PATCH v3 1/1] tools: add '--blocksize' option for C-based tools
...csv", 0, 0, 0 }, { "domain", 1, 0, 'd' }, @@ -130,6 +133,8 @@ main (int argc, char *argv[]) struct drv *drv; const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; size_t max_threads = 0; @@ -151,6 +156,8 @@ main (int argc, char *argv[]) display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION...
2020 Feb 12
0
[PATCH v2 1/1] tools: add '--blocksize' option for C-based tools
...0, 0, 'h' }, { "inodes", 0, 0, 'i' }, @@ -130,6 +133,8 @@ main (int argc, char *argv[]) struct drv *drv; const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; size_t max_threads = 0; @@ -151,6 +156,8 @@ main (int argc, char *argv[]) display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION...
2020 Feb 13
2
[PATCH v3 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch depends on changes in 'common' sub-module posted here: https://www.redhat.com/archives/libguestfs/2020-February/msg00150.html v3 fixes issue found during code review: - options now appear in alphabetical order v2: Almost the same as v1 except '--blocksize' option description is moved into a common submodule (similar to
2020 Feb 12
3
[PATCH v2 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch depends on changes in 'common' sub-module posted here: https://www.redhat.com/archives/libguestfs/2020-February/msg00099.html v2: Almost the same as v1 except '--blocksize' option description is moved into a common submodule (similar to key-option.pod). v1 was here:
2020 Feb 11
0
[PATCH 1/1] tools: add '--blocksize' option for C-based tools
...0, 0, 'h' }, { "inodes", 0, 0, 'i' }, @@ -130,6 +133,8 @@ main (int argc, char *argv[]) struct drv *drv; const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; size_t max_threads = 0; @@ -151,6 +156,8 @@ main (int argc, char *argv[]) display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION...
2020 Feb 11
2
[PATCH 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch depends on changes in 'common' sub-module posted here: https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html Nikolay Ivanets (1): tools: add '--blocksize' option for C-based tools align/scan.c | 8 ++++++++ align/virt-alignment-scan.pod | 12 ++++++++++++ cat/cat.c
2010 Mar 15
1
Glusterfs 3.0.X crashed on Fedora 11
...b64/glusterfs/3.0.3/transport/socket.so [2010-03-14 22:46:48] D [xlator.c:285:_volume_option_value_validate] server: no range check required for 'option transport.socket.listen-port 6996' [2010-03-14 22:46:48] D [io-threads.c:2841:init] brick3: io-threads: Autoscaling: off, min_threads: 16, max_threads: 16 [2010-03-14 22:46:48] D [io-threads.c:2841:init] brick2: io-threads: Autoscaling: off, min_threads: 16, max_threads: 16 [2010-03-14 22:46:48] D [io-threads.c:2841:init] brick1: io-threads: Autoscaling: off, min_threads: 16, max_threads: 16 [2010-03-14 22:46:48] D [client-protocol.c:7027:notify]...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...tion_index); + guestfs_int_program_name, + long_options[option_index].name, option_index); exit (EXIT_FAILURE); } break; @@ -170,7 +171,8 @@ main (int argc, char *argv[]) case 'P': if (sscanf (optarg, "%zu", &max_threads) != 1) { - fprintf (stderr, _("%s: -P option is not numeric\n"), guestfs_int_program_name); + fprintf (stderr, _("%s: -P option is not numeric\n"), + guestfs_int_program_name); exit (EXIT_FAILURE); } break; diff --git a/builde...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2016 Mar 07
2
[PATCH v2] Use less stack.
...{ 0, 0, 0, 0 } }; - size_t P = 0, i, errors; + size_t P = 0, i; int c, option_index; - int err; - void *status; for (;;) { c = getopt_long (argc, argv, options, long_options, &option_index); @@ -183,10 +182,27 @@ main (int argc, char *argv[]) else P = MIN (n, MIN (MAX_THREADS, estimate_max_threads ())); + run_test (P); + exit (EXIT_SUCCESS); +} + +static void +run_test (size_t P) +{ + void *status; + int err; + size_t i, errors; + CLEANUP_FREE struct thread_data *thread_data = NULL; + CLEANUP_FREE pthread_t *threads = NULL; + + thread_data = malloc (sizeof (st...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2014 Oct 04
4
[PATCH v4 0/4] tests: Introduce test harness for running tests.
This converts more of the tests (basically everything under tests/) to use the test harness, revealing some problems which have subsequently been fixed. Rich.
2014 Oct 05
12
[PATCH v5 0/7] tests: Introduce test harness for running tests.
Since v4: - More tests have been converted. - Testing local guests fixed. - Drop no-exec-stack test.
2014 Oct 23
10
[PATCH v6 00/10] tests: Introduce test harness for running tests.
For v6: This is mainly just a rebase, but I have also added tests in the ocaml/ language bindings directory, and for all the OCaml-written virt tools. Rich.
2014 Oct 24
10
[PATCH v7 00/10] tests: Introduce test harness for running tests.
v7: The only changes since v6 are those suggested by Pino in the review of v5.
2015 Jul 28
10
[PATCH 00/10] tests: Introduce test harness for running tests.
I should probably start by saying this patch series isn't ready for review yet. This patch series adds a test harness to libguestfs. It allows us to run the tests outside the ordinary 'make check' path in the build tree. In particular, you can use this to run tests when libguestfs has been installed. 'make check' and the other 'make check-*' rules still work. The