1. 14 Feb, 2020 5 commits
  2. 13 Feb, 2020 6 commits
    • Evan Hunt's avatar
      apply the modified style · e851ed0b
      Evan Hunt authored
    • Evan Hunt's avatar
      revise .clang-format and add a C formatting script in util · 0255a974
      Evan Hunt authored
      - add util/cformat.sh, which runs clang-format on all C files with
        the default .clang-format, and on all header files with a slightly
        modified version.
      - use correct bracing after multi-line control statements
      - stop aligning variable declarations to avoid problems with pointer
        alignment, but retain aligned declarations in header files so that
        struct definitions look cleaner.
      - static function prototypes in C files can skip the line break after
        the return type, but function prototypes in header files still have
        the line break.
      - don't break-before-brace in function definitions. ISC style calls
        for braces on the same line when function parameters fit on a single
        line, and a line break if they don't, but clang-format doesn't yet
        support that distinction. one-line function definitions are about
        four times more common than multi-line, so let's use the option that
        deviates less.
    • Ondřej Surý's avatar
      Merge branch '46-add-curly-braces' into 'master' · 67b68e06
      Ondřej Surý authored
      Add curly braces using uncrustify and then reformat with clang-format back
      Closes #46
      See merge request !3057
    • Ondřej Surý's avatar
      Use clang-tidy to add curly braces around one-line statements · 056e133c
      Ondřej Surý authored
      The command used to reformat the files in this commit was:
      ./util/run-clang-tidy \
      	-clang-tidy-binary clang-tidy-11
      	-clang-apply-replacements-binary clang-apply-replacements-11 \
      	-checks=-*,readability-braces-around-statements \
      	-j 9 \
      	-fix \
      	-format \
      	-style=file \
      clang-format -i --style=format $(git ls-files '*.c' '*.h')
      uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h')
      clang-format -i --style=format $(git ls-files '*.c' '*.h')
    • Ondřej Surý's avatar
    • Ondřej Surý's avatar
      Use coccinelle to add braces to nested single line statement · 36c6105e
      Ondřej Surý authored
      Both clang-tidy and uncrustify chokes on statement like this:
      for (...)
      	if (...)
      This commit uses a very simple semantic patch (below) to add braces around such
      Semantic patch used:
      statement S;
      expression E;
      while (...)
      - if (E) S
      + { if (E) { S } }
      statement S;
      expression E;
      for (...;...;...)
      - if (E) S
      + { if (E) { S } }
      statement S;
      expression E;
      if (...)
      - if (E) S
      + { if (E) { S } }
  3. 12 Feb, 2020 16 commits
  4. 11 Feb, 2020 6 commits
    • Stephen Morris's avatar
      Minor README tweaks · bc539d48
      Stephen Morris authored
    • Witold Krecicki's avatar
      Don't limit the size of uvreq/nmhandle pool artificially. · a1332396
      Witold Krecicki authored
      There was a hard limit set on number of uvreq and nmhandles
      that can be allocated by a pool, but we don't handle a situation
      where we can't get an uvreq. Don't limit the number at all,
      let the OS deal with it.
    • Ondřej Surý's avatar
      Merge branch '1428-possible-data-race-in-rbtdb-happens-occasionally-on-ppc64le' into 'master' · d3843161
      Ondřej Surý authored
      Convert all atomic operations in isc_rwlock to release-acquire memory ordering
      Closes #1428
      See merge request !2985
    • Ondřej Surý's avatar
      Convert all atomic operations in isc_rwlock to release-acquire memory ordering · b43f5e02
      Ondřej Surý authored
      The memory ordering in the rwlock was all wrong, I am copying excerpts
      from the https://en.cppreference.com/w/c/atomic/memory_order#Relaxed_ordering
      for the convenience of the reader:
        Relaxed ordering
        Atomic operations tagged memory_order_relaxed are not synchronization
        operations; they do not impose an order among concurrent memory
        accesses. They only guarantee atomicity and modification order
        Release-Acquire ordering
        If an atomic store in thread A is tagged memory_order_release and an
        atomic load in thread B from the same variable is tagged
        memory_order_acquire, all memory writes (non-atomic and relaxed atomic)
        that happened-before the atomic store from the point of view of thread
        A, become visible side-effects in thread B. That is, once the atomic
        load is completed, thread B is guaranteed to see everything thread A
        wrote to memory.
        The synchronization is established only between the threads releasing
        and acquiring the same atomic variable. Other threads can see different
        order of memory accesses than either or both of the synchronized
      Which basically means that we had no or weak synchronization between
      threads using the same variables in the rwlock structure.  There should
      not be a significant performance drop because the critical sections were
      already protected by:
        while(1) {
          if (relaxed_atomic_operation) {
          if (!relaxed_atomic_operation) {
            WAIT(sem, lock);
      I would add one more thing to "Don't do your own crypto, folks.":
        - Also don't do your own locking, folks.
    • Evan Hunt's avatar
      Merge branch '1598-dnssec-policy-doc' into 'master' · 3116a1c2
      Evan Hunt authored
      Resolve "Improve dnssec-policy documentation"
      Closes #1598
      See merge request !3023
    • Evan Hunt's avatar
      revise dnssec-policy documentation · c7866acb
      Evan Hunt authored
  5. 10 Feb, 2020 6 commits
  6. 09 Feb, 2020 1 commit