bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] sort: Add --threads option, which parallelizes internal sort


From: Jim Meyering
Subject: Re: [PATCH] sort: Add --threads option, which parallelizes internal sort.
Date: Sun, 18 Oct 2009 10:59:22 +0200

Chen Guo wrote:
>     In my last patch submission I noted while sorting in LC_ALL the endline 
> characters of a couple of lines would be randomly cut off. The cause was 
> memcoll being not threadsafe, I've since included a workaround.

Thank you for continuing to work on this change!

In order to make your patch easier to evaluate, please make a few changes:

  - adjust the patch to be relative to the latest sources from coreutils.git
      and send patches in "git format-patch ..." format, as outlined in
      HACKING: <http://git.sv.gnu.org/cgit/coreutils.git/plain/HACKING>

  - use the same formatting style as the existing code, e.g.,
      do this:  struct line *destless;
      not this: struct line* destless;

      use /* C comments */
      not // C++ comments

  - avoid gratuitous spacing/formatting changes like this:
      > -    if (ptr < lim && (eword | echar))
      > +        if (ptr < lim && (eword || echar))

  - always check for malloc failure if you must use malloc
      (otherwise, code like this segfaults upon malloc failure)
        > +  struct counters* ret = malloc (sizeof (struct counters));
        > +  ret->nless = buf - bufless;
    or use xmalloc, xrealloc, or another of the x*alloc functions,
    when it's ok to exit upon failure.

  - run "make syntax-check" and address any failure




reply via email to

[Prev in Thread] Current Thread [Next in Thread]