Following up on r1444256, use the diff processor in a few more
cases of the repos-wc diff editor.

* subversion/libsvn_wc/diff_editor.c
  (report_wc_file_as_added,
   close_file): Call the new api to simplify code.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1444264 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_wc/diff_editor.c
+++ subversion/libsvn_wc/diff_editor.c
@@ -1008,29 +1008,26 @@
                         apr_pool_t *scratch_pool)
 {
   svn_wc__db_t *db = eb->db;
-  apr_hash_t *emptyprops;
-  const char *mimetype;
-  apr_hash_t *wcprops = NULL;
-  apr_array_header_t *propchanges;
-  const char *empty_file;
+  svn_diff_source_t *right_src;
+  const char *changelist;
+  apr_hash_t *right_props = NULL;
   const char *source_file;
   const char *translated_file;
   svn_wc__db_status_t status;
   svn_revnum_t revision;
-
-  /* If this entry is filtered by changelist specification, do nothing. */
-  if (! svn_wc__internal_changelist_match(db, local_abspath,
-                                          eb->changelist_hash, scratch_pool))
-    return SVN_NO_ERROR;
-
-  SVN_ERR(get_empty_file(eb, &empty_file));
+  void *file_baton = NULL;
+  svn_boolean_t skip = FALSE;

   SVN_ERR(svn_wc__db_read_info(&status, NULL, &revision, NULL, NULL, NULL,
                                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, &changelist,
                                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                                db, local_abspath,
                                scratch_pool, scratch_pool));
+
+  if (changelist && eb->changelist_hash
+      && !svn_hash_gets(eb->changelist_hash, changelist))
+    return SVN_NO_ERROR;

   if (status == svn_wc__db_status_added)
     SVN_ERR(svn_wc__db_scan_addition(&status, NULL, NULL, NULL, NULL, NULL,
@@ -1055,19 +1052,26 @@
       return file_diff(eb, local_abspath, path, scratch_pool);
     }

-  emptyprops = apr_hash_make(scratch_pool);
+  right_src = svn_diff__source_create(revision, scratch_pool);
+
+  SVN_ERR(eb->processor->file_opened(&file_baton, &skip,
+                                     path,
+                                     NULL,
+                                     right_src,
+                                     NULL,
+                                     NULL /* ### dir_baton */,
+                                     eb->processor,
+                                     scratch_pool, scratch_pool));
+
+  if (skip)
+    return SVN_NO_ERROR;

   if (eb->use_text_base)
-    SVN_ERR(svn_wc__db_read_pristine_props(&wcprops, db, local_abspath,
+    SVN_ERR(svn_wc__db_read_pristine_props(&right_props, db, local_abspath,
                                            scratch_pool, scratch_pool));
   else
-    SVN_ERR(svn_wc__get_actual_props(&wcprops, db, local_abspath,
-                                     scratch_pool, scratch_pool));
-  mimetype = get_prop_mimetype(wcprops);
-
-  SVN_ERR(svn_prop_diffs(&propchanges,
-                         wcprops, emptyprops, scratch_pool));
-
+    SVN_ERR(svn_wc__db_read_props(&right_props, db, local_abspath,
+                                  scratch_pool, scratch_pool));

   if (eb->use_text_base)
     {
@@ -1086,14 +1090,15 @@
            scratch_pool, scratch_pool));
     }

-  SVN_ERR(eb->callbacks->file_added(NULL, NULL, NULL,
-                                    path,
-                                    empty_file, translated_file,
-                                    0, revision,
-                                    NULL, mimetype,
-                                    NULL, SVN_INVALID_REVNUM,
-                                    propchanges, emptyprops,
-                                    eb->callback_baton,
+  SVN_ERR(eb->processor->file_added(path,
+                                    NULL /* copyfrom source */,
+                                    right_src,
+                                    NULL /* copyfrom file */,
+                                    translated_file,
+                                    NULL /* copyfrom props */,
+                                    right_props,
+                                    file_baton,
+                                    eb->processor,
                                     scratch_pool));

   return SVN_NO_ERROR;
@@ -1758,28 +1763,31 @@
   else if (fb->added
            || (!eb->use_text_base && status == svn_wc__db_status_deleted))
     {
-      if (eb->reverse_order)
-        return eb->callbacks->file_added(NULL, NULL, NULL, fb->path,
-                                         empty_file,
-                                         repos_file,
-                                         0,
-                                         eb->revnum,
-                                         NULL,
-                                         repos_mimetype,
-                                         NULL, SVN_INVALID_REVNUM,
-                                         fb->propchanges,
-                                         apr_hash_make(pool),
-                                         eb->callback_baton,
-                                         scratch_pool);
-      else
-        return eb->callbacks->file_deleted(NULL, NULL, fb->path,
-                                           repos_file,
-                                           empty_file,
-                                           repos_mimetype,
-                                           NULL,
-                                           repos_props,
-                                           eb->callback_baton,
-                                           scratch_pool);
+      void *file_baton = NULL;
+      svn_boolean_t skip = FALSE;
+
+      svn_diff_source_t *left_src = svn_diff__source_create(eb->revnum,
+                                                            scratch_pool);
+
+      SVN_ERR(eb->processor->file_opened(&file_baton, &skip,
+                                         fb->path,
+                                         left_src,
+                                         NULL /* right source */,
+                                         NULL /* copyfrom source */,
+                                         NULL /* ### dir_baton */,
+                                         eb->processor,
+                                         scratch_pool, scratch_pool));
+
+      if (! skip)
+        SVN_ERR(eb->processor->file_deleted(fb->path,
+                                            left_src,
+                                            repos_file,
+                                            repos_props,
+                                            file_baton,
+                                            eb->processor,
+                                            scratch_pool));
+
+      return SVN_NO_ERROR;
     }

   if (status == svn_wc__db_status_added)
@@ -1792,19 +1800,43 @@
    * as added, diff the file with the empty file. */
   if ((status == svn_wc__db_status_copied ||
        status == svn_wc__db_status_moved_here) && eb->show_copies_as_adds)
-    return eb->callbacks->file_added(NULL, NULL, NULL, fb->path,
-                                     empty_file,
-                                     fb->local_abspath,
-                                     0,
-                                     eb->revnum,
-                                     NULL,
-                                     repos_mimetype,
-                                     NULL, SVN_INVALID_REVNUM,
-                                     fb->propchanges,
-                                     apr_hash_make(pool),
-                                     eb->callback_baton,
-                                     scratch_pool);
-
+    {
+      void *file_baton = NULL;
+      svn_boolean_t skip = FALSE;
+
+      svn_diff_source_t *right_src = svn_diff__source_create(eb->revnum,
+                                                             scratch_pool);
+
+      /* ### This code path looks like an ugly hack. No normalization,
+             nothing... */
+
+      SVN_ERR(eb->processor->file_opened(&file_baton, &skip,
+                                         fb->path,
+                                         NULL /* left_source */,
+                                         right_src,
+                                         NULL /* copyfrom source */,
+                                         NULL /* ### dir_baton */,
+                                         eb->processor,
+                                         scratch_pool, scratch_pool));
+
+      if (! skip)
+        {
+          apr_hash_t *right_props;
+          SVN_ERR(svn_wc__db_read_props(&right_props, db, fb->local_abspath,
+                                        scratch_pool, scratch_pool));
+
+          SVN_ERR(eb->processor->file_added(fb->path,
+                                          NULL /* copyfrom_src */,
+                                          right_src,
+                                          NULL /* copyfrom file */,
+                                          fb->local_abspath,
+                                          NULL /* copyfrom props */,
+                                          right_props,
+                                          file_baton,
+                                          eb->processor,
+                                          scratch_pool));
+        }
+    }
   /* If we didn't see any content changes between the BASE and repository
      versions (i.e. we only saw property changes), then, if we're diffing
      against WORKING, we also need to check whether there are any local


Lose some pointless code.

Lose some pointless code.

* subversion/mod_dav_svn/deadprops.c
  (db_store): Don't bother converting 'ns' and 'name' into a
    repository property name -- we don't use the result anyway.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1398333 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/mod_dav_svn/deadprops.c
+++ subversion/mod_dav_svn/deadprops.c
@@ -514,10 +514,6 @@
   /* ### namespace check? */
   if (elem->first_child && !strcmp(elem->first_child->name, SVN_DAV__OLD_VALUE))
     {
-      const char *propname;
-
-      get_repos_propname(db, name, &propname);
-
       /* Parse OLD_PROPVAL. */
       old_propval = svn_string_create(dav_xml_get_cdata(elem->first_child, pool,
                                                         0 /* strip_white */),


IB: Make struct ib_uobject.id a signed int

IDR IDs are signed, so struct ib_uobject.id should be signed.  This
avoids some sparse pointer signedness warnings.

Signed-off-by: Roland Dreier <91e9b5f7ca0bb6300133ed378670d64af90dde66@cisco.com>

--- include/rdma/ib_verbs.h
+++ include/rdma/ib_verbs.h
@@ -730,7 +730,7 @@
 	struct ib_ucontext     *context;	/* associated user context */
 	void		       *object;		/* containing object */
 	struct list_head	list;		/* link to context's list */
-	u32			id;		/* index into kernel idr */
+	int			id;		/* index into kernel idr */
 	struct kref		ref;
 	struct rw_semaphore	mutex;		/* protects .live */
 	int			live;


Remove export declarations from deleted/inline functions

--- inc/osvr/Util/Logger.h
+++ inc/osvr/Util/Logger.h
@@ -101,10 +101,10 @@
                           spdlog::sinks_init_list sinks);

             /// Non-copyable
-            OSVR_UTIL_EXPORT Logger(const Logger &) = delete;
+            Logger(const Logger &) = delete;

             /// Non-copy-assignable
-            OSVR_UTIL_EXPORT Logger &operator=(const Logger &) = delete;
+            Logger &operator=(const Logger &) = delete;

             /// Destructor
             OSVR_UTIL_EXPORT ~Logger();
@@ -203,7 +203,7 @@
             OSVR_UTIL_EXPORT void flush();

             /// Get the logger name
-            OSVR_UTIL_EXPORT std::string const &getName() const {
+            std::string const &getName() const {
                 return name_;
             }


Reorder result and scratch pools so the result pool comes first, as per
our de facto standard.  No logic changes.

* subversion/mod_dav_svn/liveprops.c

  (insert_prop_internal): Make the result pool first.

  (insert_prop,
   dav_svn__insert_all_liveprops): Update callers to insert_prop_internal().

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1402617 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/mod_dav_svn/liveprops.c
+++ subversion/mod_dav_svn/liveprops.c
@@ -277,8 +277,8 @@
                      int propid,
                      dav_prop_insert what,
                      apr_text_header *phdr,
-                     apr_pool_t *scratch_pool,
-                     apr_pool_t *result_pool)
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool)
 {
   const char *value = NULL;
   const char *s;
@@ -822,7 +822,7 @@
   scratch_pool = svn_pool_create(result_pool);

   rv = insert_prop_internal(resource, propid, what, phdr,
-                              scratch_pool, result_pool);
+                            result_pool, scratch_pool);

   svn_pool_destroy(scratch_pool);
   return rv;
@@ -960,7 +960,7 @@
     {
       svn_pool_clear(iterpool);
       (void) insert_prop_internal(resource, spec->propid, what, phdr,
-                                  iterpool, resource->pool);
+                                  resource->pool, iterpool);
     }
   svn_pool_destroy(iterpool);


attempt to fix linux build

attempt to fix linux build

--- lib/Runtime/Library/ConcatString.h
+++ lib/Runtime/Library/ConcatString.h
@@ -249,6 +249,7 @@
         static uint32 GetOffsetOfSlots() { return offsetof(ConcatStringMulti, m_slots); }
     protected:
         Field(uint) slotCount;
+        Field(uint) __alignment;
         Field(JavascriptString*) m_slots[];   // These contain the child nodes.

 #if DBG


Fix cast() printing

Fix cast() printing

--- include/tiramisu/expr.h
+++ include/tiramisu/expr.h
@@ -1487,7 +1487,7 @@
                         str +=  ") ";
                         break;
                     case tiramisu::o_cast:
-                        str +=  "cast(" + str_from_tiramisu_type_primitive(this->get_data_type()) + ", " + this->get_operand(0).to_str();
+                        str +=  "cast(" + this->get_operand(0).to_str();
                         str +=  ") ";
                         break;
                     case tiramisu::o_access:


Added '==' and '<=' operators for Vector class.

--- include/Gauss/Equals.h
+++ include/Gauss/Equals.h
@@ -52,6 +52,21 @@
 }

+/* --- Global Operators --- */
+
+template <typename T, std::size_t N>
+bool operator == (const Vector<T, N>& lhs, const Vector<T, N>& rhs)
+{
+    return Equals(lhs, rhs);
+}
+
+template <typename T, std::size_t N>
+bool operator != (const Vector<T, N>& lhs, const Vector<T, N>& rhs)
+{
+    return !(lhs == rhs);
+}
+
+
 } // /namespace Gs


Minor changes

Minor changes

--- include/HttpResponse.h
+++ include/HttpResponse.h
@@ -41,8 +41,6 @@
         const HttpStatus& getStatus() const;
         void setStatus(const HttpStatus& status);

-        // TODO: use move semantics, perfect forwarding and stuff
-        // see https://www.codeproject.com/Articles/397492/Move-Semantics-and-Perfect-Forwarding-in-Cplusplus
         void setBody(const std::string& body);
         const std::string& getBody() const;


Fix 'redundant redeclaration' warning due to missing include guard

Change-Id: Ifa8273d9e95ec4d16e52fec64db2d3ebd50e4e4b
Reviewed-on: http://review.couchbase.org/51690
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>

--- include/JSON_checker.h
+++ include/JSON_checker.h
@@ -1,4 +1,6 @@
 /* JSON_checker.h */
+
+#pragma once

 #ifdef JSON_checker_EXPORTS


QwLinkTraits.h: rename include guard define to match file name

--- include/QwLinkTraits.h
+++ include/QwLinkTraits.h
@@ -19,8 +19,8 @@
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
 */
-#ifndef INCLUDED_QWSINGLELINKNODEINFO_H
-#define INCLUDED_QWSINGLELINKNODEINFO_H
+#ifndef INCLUDED_QWLINKTRAITS_H
+#define INCLUDED_QWLINKTRAITS_H

 #include "QwConfig.h"

@@ -105,7 +105,7 @@
     }
 };

-#endif /* INCLUDED_SINGLELINKNODEINFO_H */
+#endif /* INCLUDED_QWLINKTRAITS_H */

 /* -----------------------------------------------------------------------
 Last reviewed: April 22, 2014


vk/vulkan.h: Use the query result bits from revision 130

None of the important bits or names actually changed.  It just
added/removed some no-op names.

No functional change.

--- include/vulkan/vulkan.h
+++ include/vulkan/vulkan.h
@@ -942,9 +942,8 @@
 typedef VkFlags VkQueryPipelineStatisticFlags;

 typedef enum {
-    VK_QUERY_RESULT_32_BIT = 0,
+    VK_QUERY_RESULT_DEFAULT = 0,
     VK_QUERY_RESULT_64_BIT = 0x00000001,
-    VK_QUERY_RESULT_NO_WAIT_BIT = 0,
     VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
     VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004,
     VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008,


* SDI_compiler.h: added missing RODATA definition.


misc: Update to Vulkan header version 17

Only changes:

VK_HEADER_VERSION 17
VK_EXT_DEBUG_REPORT_SPEC_VERSION  3

Change-Id: I122bdcabec1f831a6ed1a06b5caf6202a2a94529

--- include/vulkan/vulkan.h
+++ include/vulkan/vulkan.h
@@ -43,7 +43,7 @@
 #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
 #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
 // Version of this file
-#define VK_HEADER_VERSION 16
+#define VK_HEADER_VERSION 17

 #define VK_NULL_HANDLE 0
@@ -3715,7 +3715,7 @@
 #define VK_EXT_debug_report 1
 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)

-#define VK_EXT_DEBUG_REPORT_SPEC_VERSION  2
+#define VK_EXT_DEBUG_REPORT_SPEC_VERSION  3
 #define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
 #define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT


Update example.

Update example.

--- include/yaz/retrieval.h
+++ include/yaz/retrieval.h
@@ -24,7 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $Id: retrieval.h,v 1.8 2007-01-03 08:42:14 adam Exp $ */
+/* $Id: retrieval.h,v 1.9 2007-02-08 10:51:23 adam Exp $ */

 /**
  * \file retrieval.h
@@ -65,20 +65,24 @@

     For retrieval:
     \verbatim
-    <retrievalinfo>
-       <retrieval syntax="usmarc" name="marcxml"
-            identifier="info:srw/schema/1/marcxml-v1.1"
-            backendsyntax="xml" backendname="dc"
-       >
-         <title>MARCXML</title>
-         <convert>
-            <marc inputformat="marc" outputformat="marcxml"
-                         inputcharset="marc-8"/>
-            <xslt stylesheet="marcxml2mods.xsl"/>
-            <xslt stylesheet="mods2dc.xsl"/>
-         </convert>
+     <retrievalinfo>
+       <retrieval syntax="usmarc" name="F"/>
+       <retrieval syntax="usmarc" name="B"/>
+       <retrieval syntax="xml" name="marcxml"
+		  identifier="info:srw/schema/1/marcxml-v1.1">
+         <backend syntax="usmarc" name="F">
+	   <marc inputformat="marc" outputformat="marcxml"
+		 inputcharset="marc-8"/>
+	 </backend>
        </retrieval>
-    </retrievalinfo>
+       <retrieval syntax="xml" name="dc">
+         <backend syntax="usmarc" name="F">
+	   <marc inputformat="marc" outputformat="marcxml"
+		 inputcharset="marc-8"/>
+           <xslt stylesheet="MARC21slim2DC.xsl"/>
+	 </backend>
+       </retrieval>
+     </retrievalinfo>
     \endverbatim
 */
 YAZ_EXPORT


Add casts for SkColor constant macros.

Add casts for SkColor constant macros.

This ensures the compiler knows they are SkColors and not "int" which
can't be implicitly casted when you end up with a reference to it.

Bug: skia: 6696
Change-Id: Ieb6a2270d7d01df279d55e0bad7a793a8edd8658
Reviewed-on: https://skia-review.googlesource.com/18081
Commit-Queue: danakj chromium <c86aaa30b07c5d899d1ba3c6956afd8896053056@chromium.org>
Commit-Queue: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@chromium.org>
Reviewed-by: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@chromium.org>

--- include/core/SkColor.h
+++ include/core/SkColor.h
@@ -73,23 +73,37 @@

 // common colors

-#define SK_AlphaTRANSPARENT 0x00        //!< transparent SkAlpha value
-#define SK_AlphaOPAQUE      0xFF        //!< opaque SkAlpha value
-
-#define SK_ColorTRANSPARENT 0x00000000  //!< transparent SkColor value
-
-#define SK_ColorBLACK       0xFF000000  //!< black SkColor value
-#define SK_ColorDKGRAY      0xFF444444  //!< dark gray SkColor value
-#define SK_ColorGRAY        0xFF888888  //!< gray SkColor value
-#define SK_ColorLTGRAY      0xFFCCCCCC  //!< light gray SkColor value
-#define SK_ColorWHITE       0xFFFFFFFF  //!< white SkColor value
-
-#define SK_ColorRED         0xFFFF0000  //!< red SkColor value
-#define SK_ColorGREEN       0xFF00FF00  //!< green SkColor value
-#define SK_ColorBLUE        0xFF0000FF  //!< blue SkColor value
-#define SK_ColorYELLOW      0xFFFFFF00  //!< yellow SkColor value
-#define SK_ColorCYAN        0xFF00FFFF  //!< cyan SkColor value
-#define SK_ColorMAGENTA     0xFFFF00FF  //!< magenta SkColor value
+/** transparent SkAlpha value */
+#define SK_AlphaTRANSPARENT static_cast<SkAlpha>(0x00)
+/** opaque SkAlpha value */
+#define SK_AlphaOPAQUE      static_cast<SkAlpha>(0xFF)
+
+/** transparent SkColor value */
+#define SK_ColorTRANSPARENT static_cast<SkColor>(0x00000000)
+
+/** black SkColor value */
+#define SK_ColorBLACK       static_cast<SkColor>(0xFF000000)
+/** dark gray SkColor value */
+#define SK_ColorDKGRAY      static_cast<SkColor>(0xFF444444)
+/** gray SkColor value */
+#define SK_ColorGRAY        static_cast<SkColor>(0xFF888888)
+/** light gray SkColor value */
+#define SK_ColorLTGRAY      static_cast<SkColor>(0xFFCCCCCC)
+/** white SkColor value */
+#define SK_ColorWHITE       static_cast<SkColor>(0xFFFFFFFF)
+
+/** red SkColor value */
+#define SK_ColorRED         static_cast<SkColor>(0xFFFF0000)
+/** green SkColor value */
+#define SK_ColorGREEN       static_cast<SkColor>(0xFF00FF00)
+/** blue SkColor value */
+#define SK_ColorBLUE        static_cast<SkColor>(0xFF0000FF)
+/** yellow SkColor value */
+#define SK_ColorYELLOW      static_cast<SkColor>(0xFFFFFF00)
+/** cyan SkColor value */
+#define SK_ColorCYAN        static_cast<SkColor>(0xFF00FFFF)
+/** magenta SkColor value */
+#define SK_ColorMAGENTA     static_cast<SkColor>(0xFFFF00FF)

 ////////////////////////////////////////////////////////////////////////


Update motor.h

Update motor.h

--- includes/packet/motor.h
+++ includes/packet/motor.h
@@ -39,7 +39,7 @@

     struct {
         unsigned char motor : 4;    ///< Motor index
-        unsigned char command : 4;  ///< Motor command (TODO explain better with a list of command or a reference to the list of command)
+        unsigned char command : 4;  ///< Motor command
     } bitset;
     unsigned char command_message;
 } motor_command_map_t;
@@ -132,15 +132,15 @@
         motor_control_t motor_control;

 //Numbers associated for motor messages to be used in the structure @ref motor_command_map_t as value for @ref command
-#define MOTOR 0
-#define MOTOR_PARAMETER 1
-#define MOTOR_CONSTRAINT 2
-#define MOTOR_EMERGENCY 3
-#define MOTOR_STATE 4
-#define MOTOR_VEL_PID 5
-#define MOTOR_VEL_REF 6
-#define MOTOR_VEL_MEAS 7
-#define MOTOR_POS_MEAS 8
+#define MOTOR               0 ///< TODO Explain what this means
+#define MOTOR_PARAMETER     1 ///< TODO Explain what this means
+#define MOTOR_CONSTRAINT    2 ///< TODO Explain what this means
+#define MOTOR_EMERGENCY     3 ///< TODO Explain what this means
+#define MOTOR_STATE         4 ///< TODO Explain what this means
+#define MOTOR_VEL_PID       5 ///< TODO Explain what this means
+#define MOTOR_VEL_REF       6 ///< TODO Explain what this means
+#define MOTOR_VEL_MEAS      7 ///< TODO Explain what this means
+#define MOTOR_POS_MEAS      8 ///< TODO Explain what this means

 //Name for HASHMAP with information about motion messages
 #define HASHMAP_MOTOR 'G'


- Reverted Brandon's broken change.
- Eliminated obsolete do_focus().

git-svn-id: 28d9401aa571d5108e51b194aae6f24ca5964c06@2008 8cc4aa7f-3514-0410-904f-f2cc9021211c

--- include/cssys/system.h
+++ include/cssys/system.h
@@ -85,8 +85,6 @@
  */
 class csSystemDriver : public iSystem
 {
-	DECLARE_IBASE;
-
   // This is a private structure used to keep the list of plugins
   class csPlugIn : public csBase
   {
@@ -325,12 +323,6 @@
    * FrameWidth and FrameHeight from the given mode string.
    */
   void SetMode (const char* mode);
-
-  /**
-   * System-dependent code should call this to emit 'focus changed' events.
-   * Initially system assumes that CrystalSpace window is active.
-   */
-  void do_focus (int enable);

 public:
   /**************************** iSystem interface ****************************/


drm: fix trivial typo mistake

drm: fix trivial typo mistake

Signed-off-by: John Hunter <09dd02a3136250300157b7d8a9042f64386668f6@gmail.com>
Signed-off-by: Daniel Vetter <c1b6782c4af8f0673da8923a0702a1832e5940f4@ffwll.ch>


Mention portMAX_DELAY in xEventGroupWaitBits docs (#411)

The public function xEventGroupWaitBits passes xTicksToWait to the
function vTaskPlaceOnUnorderedEventList, which passes the number of
ticks to prvAddCurrentTaskToDelayedList and sets xCanBlockIndefinitely
to pdTRUE, causing the latter to block indefinitely if
xTicksToWait == portMAX_DELAY and INCLUDE_vTaskSuspend == 1.

--- include/event_groups.h
+++ include/event_groups.h
@@ -243,7 +243,8 @@
  *
  * @param xTicksToWait The maximum amount of time (specified in 'ticks') to wait
  * for one/all (depending on the xWaitForAllBits value) of the bits specified by
- * uxBitsToWaitFor to become set.
+ * uxBitsToWaitFor to become set. A value of portMAX_DELAY can be used to block
+ * indefinitely (provided INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h).
  *
  * @return The value of the event group at the time either the bits being waited
  * for became set, or the block time expired.  Test the return value to know


Fixed sendfile function compilation warning for linux. Fixed typo in fdsyc.

--- include/file_details.h
+++ include/file_details.h
@@ -103,9 +103,9 @@
             }

-
+            off_t size_offset = size;
  #ifdef __APPLE__
-            off_t size_offset = size;
+
             LOG_DEBUG("Reading %llu  bytes from offset[%llu]", size, offset);
            ssize_t result =  sendfile(fd_, socket, offset, &size_offset, NULL, 0);
            if(result == 0 || result == EAGAIN) {
@@ -117,7 +117,7 @@
                    fd_, socket, result, strerror(result));
            LOG_RET("failed", -1);
 #else
-           ssize_t result = sendfile(socket, fd_, &offset, size);
+           ssize_t result = sendfile(socket, fd_, &size_offset, size);
            if(result >= 0 ) {
                LOG_RET("success", result);
            }else if(result == EAGAIN) {
@@ -215,7 +215,7 @@
 #ifdef __APPLE__
             fsync(fd_);
 #else
-            fdatasync(f.fd_);
+            fdatasync(fd_);
 #endif
             ::close(fd_);
             fd_ = -1;
@@ -231,7 +231,7 @@
 #ifdef __APPLE__
             fsync(fd_);
 #else
-            fdatasync(f.fd_);
+            fdatasync(fd_);
 #endif
             LOG_EVENT("File[%s] is flushed to disk", file_name_.c_str());
             LOG_OUT("");


win32: update config.h to git

win32: update config.h to git

Until someone ports the new win32 config.h logic from the
other modules to -ugly.

--- win32/common/config.h
+++ win32/common/config.h
@@ -21,7 +21,7 @@
 #define GST_LICENSE "LGPL"

 /* package name in plugins */
-#define GST_PACKAGE_NAME "GStreamer Ugly Plug-ins source release"
+#define GST_PACKAGE_NAME "GStreamer Ugly Plug-ins CVS/prerelease"

 /* package origin */
 #define GST_PACKAGE_ORIGIN "Unknown package origin"
@@ -196,13 +196,13 @@
 #undef PACKAGE_NAME "GStreamer Ugly Plug-ins"

 /* Define to the full name and version of this package. */
-#undef PACKAGE_STRING "GStreamer Ugly Plug-ins 0.10.11"
+#undef PACKAGE_STRING "GStreamer Ugly Plug-ins 0.10.11.1"

 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME "gst-plugins-ugly"

 /* Define to the version of this package. */
-#undef PACKAGE_VERSION "0.10.11"
+#undef PACKAGE_VERSION "0.10.11.1"

 /* directory where plugins are located */
 #undef PLUGINDIR
@@ -226,7 +226,7 @@
 #undef STDC_HEADERS

 /* Version number of package */
-#define VERSION "0.10.11"
+#define VERSION "0.10.11.1"

 /* Define to 1 if your processor stores words with the most significant byte
    first (like Motorola and SPARC, unlike Intel and VAX). */


rename: add missing set_bgq_ and _netbsd_hooks(...

rename: add missing set_bgq_ and _netbsd_hooks()

This commit was SVN r5646.

--- include/hwloc/rename.h
+++ include/hwloc/rename.h
@@ -533,12 +533,14 @@
 #define hwloc_set_binding_hooks HWLOC_NAME(set_binding_hooks)

 #define hwloc_set_linuxfs_hooks HWLOC_NAME(set_linuxfs_hooks)
+#define hwloc_set_bgq_hooks HWLOC_NAME(set_bgq_hooks)
 #define hwloc_set_solaris_hooks HWLOC_NAME(set_solaris_hooks)
 #define hwloc_set_aix_hooks HWLOC_NAME(set_aix_hooks)
 #define hwloc_set_osf_hooks HWLOC_NAME(set_osf_hooks)
 #define hwloc_set_windows_hooks HWLOC_NAME(set_windows_hooks)
 #define hwloc_set_darwin_hooks HWLOC_NAME(set_darwin_hooks)
 #define hwloc_set_freebsd_hooks HWLOC_NAME(set_freebsd_hooks)
+#define hwloc_set_netbsd_hooks HWLOC_NAME(set_netbsd_hooks)
 #define hwloc_set_hpux_hooks HWLOC_NAME(set_hpux_hooks)

 #define hwloc_add_uname_info HWLOC_NAME(add_uname_info)


Reorganize the methods in io_interface.

Reorganize the methods in io_interface.

--- include/io_interface.h
+++ include/io_interface.h
@@ -94,38 +94,55 @@
 		return curr;
 	}

+	int get_node_id() const {
+		assert(curr);
+		return curr->get_node_id();
+	}
+
+	int get_io_idx() const {
+		return io_idx;
+	}
+
+	/**
+	 * The number of requests are allowed to be sent to the IO instance.
+	 */
+	int get_remaining_io_slots() const {
+		return get_max_num_pending_ios() - num_pending_ios();
+	}
+
 	/* When a thread begins, this method will be called. */
 	virtual int init() {
 		return 0;
 	}

-	int get_io_idx() const {
-		return io_idx;
-	}
-
-	/**
-	 * set the callback if the class supports the asynchronous fashion.
-	 * If the class doesn't support async IO, return false.
-	 */
-	virtual bool set_callback(callback *cb) {
-		return false;
-	}
-
-	virtual callback *get_callback() {
+	/**
+	 * Each IO instance can only access one file. This returns the ID of
+	 * the file being accessed by the IO instance.
+	 */
+	virtual int get_file_id() const = 0;
+
+	/**
+	 * This method needs to be called before destroying the IO instance.
+	 */
+	virtual void cleanup() {
+	}
+
+	virtual void print_stat(int nthreads) {
+	}
+
+	virtual io_interface *clone(thread *t) const {
 		return NULL;
 	}

+	/**
+	 * Indicate whether it supports asynchronous IO interface.
+	 */
 	virtual bool support_aio() {
 		return false;
 	}

-	virtual int get_file_id() const = 0;
-
-	virtual void cleanup() {
-	}
-
-	/**
-	 * The asynchronous IO interface
+	/**
+	 * The asynchronous IO should implement some of the following methods.
 	 */

 	/**
@@ -157,9 +174,6 @@
 	}
 	virtual void set_max_num_pending_ios(int max) {
 		this->max_num_pending_ios = max;
-	}
-	int get_remaining_io_slots() const {
-		return get_max_num_pending_ios() - num_pending_ios();
 	}

 	/**
@@ -175,22 +189,22 @@
 	}

 	/**
+	 * set the callback if the class supports the asynchronous fashion.
+	 * If the class doesn't support async IO, return false.
+	 */
+	virtual bool set_callback(callback *cb) {
+		return false;
+	}
+
+	virtual callback *get_callback() {
+		return NULL;
+	}
+
+	/**
 	 * The synchronous IO interface.
 	 */
 	virtual io_status access(char *, off_t, ssize_t, int) {
 		return IO_UNSUPPORTED;
-	}
-
-	virtual void print_stat(int nthreads) {
-	}
-
-	virtual io_interface *clone(thread *t) const {
-		return NULL;
-	}
-
-	int get_node_id() const {
-		assert(curr);
-		return curr->get_node_id();
 	}
 };


add remaining C keywords, as well as some C99 and extension keywords

--- include/katal/common.h
+++ include/katal/common.h
@@ -82,14 +82,40 @@
     ktt_void,
     ktt_struct,
     ktt_union,
+    ktt_enum,
+    ktt_typedef,
     ktt_unsigned,
     ktt_signed,
+    ktt_short,
     ktt_long,
     ktt_char,
     ktt_int,
     ktt_double,
     ktt_float,
     ktt_return,
+    ktt_const,
+    ktt_volatile,
+    ktt_static,
+    ktt_extern,
+    ktt_auto,
+    ktt_register,
+    ktt_do,
+    ktt_while,
+    ktt_for,
+    ktt_continue,
+    ktt_break,
+    ktt_if,
+    ktt_else,
+    ktt_switch,
+    ktt_case,
+    ktt_default,
+    ktt_goto,
+    ktt_sizeof,
+
+    ktt_inline,
+    ktt_complex,
+
+    ktt_typeof,

     /* (mostly) logical tokens */
     ktt_comment,
@@ -149,7 +175,8 @@
     ktt_variable,
     ktt_literal,
     ktt_function_prototype,
-    ktt_typecast
+    ktt_typecast,
+    ktt_label
 };

 union katal_token_payload


Cleaned up a little

Cleaned up a little

--- include/libirecovery.h
+++ include/libirecovery.h
@@ -18,6 +18,10 @@

 #ifndef LIBIRECOVERY_H
 #define LIBIRECOVERY_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif

 #include <libusb-1.0/libusb.h>

@@ -80,25 +84,29 @@
 	irecv_event_cb_t disconnected_callback;
 };

-irecv_error_t irecv_event_subscribe(irecv_client_t client, irecv_event_type type, irecv_event_cb_t callback, void *user_data);
-irecv_error_t irecv_event_unsubscribe(irecv_client_t client, irecv_event_type type);
-irecv_error_t irecv_setenv(irecv_client_t client, const char* variable, const char* value);
+void irecv_set_debug_level(int level);
+const char* irecv_strerror(irecv_error_t error);
 irecv_error_t irecv_open(irecv_client_t* client);
 irecv_error_t irecv_reset(irecv_client_t client);
 irecv_error_t irecv_close(irecv_client_t client);
 irecv_error_t irecv_receive(irecv_client_t client);
 irecv_error_t irecv_send_exploit(irecv_client_t client);
-void irecv_set_debug_level(int level);
-irecv_error_t irecv_execute_script(irecv_client_t client, const char* filename);
-irecv_error_t irecv_getenv(irecv_client_t client, const char* variable, char** value);
 irecv_error_t irecv_get_cpid(irecv_client_t client, unsigned int* cpid);
 irecv_error_t irecv_get_bdid(irecv_client_t client, unsigned int* bdid);
+irecv_error_t irecv_send_file(irecv_client_t client, const char* filename);
 irecv_error_t irecv_get_ecid(irecv_client_t client, unsigned long long* ecid);
-irecv_error_t irecv_send_file(irecv_client_t client, const char* filename);
+irecv_error_t irecv_execute_script(irecv_client_t client, const char* filename);
 irecv_error_t irecv_send_command(irecv_client_t client, unsigned char* command);
 irecv_error_t irecv_set_configuration(irecv_client_t client, int configuration);
+irecv_error_t irecv_event_unsubscribe(irecv_client_t client, irecv_event_type type);
+irecv_error_t irecv_getenv(irecv_client_t client, const char* variable, char** value);
+irecv_error_t irecv_setenv(irecv_client_t client, const char* variable, const char* value);
 irecv_error_t irecv_set_interface(irecv_client_t client, int interface, int alt_interface);
 irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* buffer, unsigned int length);
-const char* irecv_strerror(irecv_error_t error);
+irecv_error_t irecv_event_subscribe(irecv_client_t client, irecv_event_type type, irecv_event_cb_t callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif

 #endif


i2c: Update the list of bus IDs

i2c: Update the list of bus IDs

* The Voodoo3 has no SMBus, it has two bit-banged busses which
  already have an ID assigned (I2C_HW_B_VOO).
* The i2c-ipmi bus driver was a non-sense, it'll never be ported
  to Linux 2.6.

Signed-off-by: Jean Delvare <49ad6a9f5aa17024c23048df346d55bda6837e01@linux-fr.org>
Acked-by: Yani Ioannou <1508c11386b1408cd96f5602fe8196266ec076e6@gmail.com>

--- include/linux/i2c-id.h
+++ include/linux/i2c-id.h
@@ -232,7 +232,6 @@
 #define I2C_HW_SMBUS_PIIX4	0x040000
 #define I2C_HW_SMBUS_ALI15X3	0x040001
 #define I2C_HW_SMBUS_VIA2	0x040002
-#define I2C_HW_SMBUS_VOODOO3	0x040003
 #define I2C_HW_SMBUS_I801	0x040004
 #define I2C_HW_SMBUS_AMD756	0x040005
 #define I2C_HW_SMBUS_SIS5595	0x040006
@@ -252,9 +251,6 @@
 /* --- ISA pseudo-adapter						*/
 #define I2C_HW_ISA		0x050000

-/* --- IPMI pseudo-adapter						*/
-#define I2C_HW_IPMI		0x0b0000
-
 /* --- IPMB adapter						*/
 #define I2C_HW_IPMB		0x0c0000


Add 'pr_fmt()' format modifier to pr_xyz macros.

A common reason for device drivers to implement their own printk macros
is the lack of a printk prefix with the standard pr_xyz macros.
Introduce a pr_fmt() macro that is applied for every pr_xyz macro to the
format string.

The most common use of the pr_fmt macro would be to add the name of the
device driver to all pr_xyz messages in a source file.

Signed-off-by: Martin Schwidefsky <52616596d8f5df0d597e85ab515377f92f939c68@de.ibm.com>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

--- include/linux/kernel.h
+++ include/linux/kernel.h
@@ -318,32 +318,36 @@
 	return buf;
 }

-#define pr_emerg(fmt, arg...) \
-	printk(KERN_EMERG fmt, ##arg)
-#define pr_alert(fmt, arg...) \
-	printk(KERN_ALERT fmt, ##arg)
-#define pr_crit(fmt, arg...) \
-	printk(KERN_CRIT fmt, ##arg)
-#define pr_err(fmt, arg...) \
-	printk(KERN_ERR fmt, ##arg)
-#define pr_warning(fmt, arg...) \
-	printk(KERN_WARNING fmt, ##arg)
-#define pr_notice(fmt, arg...) \
-	printk(KERN_NOTICE fmt, ##arg)
-#define pr_info(fmt, arg...) \
-	printk(KERN_INFO fmt, ##arg)
+#ifndef pr_fmt
+#define pr_fmt(fmt) fmt
+#endif
+
+#define pr_emerg(fmt, ...) \
+        printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_alert(fmt, ...) \
+        printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_crit(fmt, ...) \
+        printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_err(fmt, ...) \
+        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_warning(fmt, ...) \
+        printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_notice(fmt, ...) \
+        printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_info(fmt, ...) \
+        printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)

 /* If you are writing a driver, please use dev_dbg instead */
 #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
 #define pr_debug(fmt, ...) do { \
-	dynamic_pr_debug(fmt, ##__VA_ARGS__); \
+	dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
 	} while (0)
 #elif defined(DEBUG)
-#define pr_debug(fmt, arg...) \
-	printk(KERN_DEBUG fmt, ##arg)
-#else
-#define pr_debug(fmt, arg...) \
-	({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; })
+#define pr_debug(fmt, ...) \
+	printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
+#else
+#define pr_debug(fmt, ...) \
+	({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
 #endif

 /*


[PATCH] libata: implement ata_dev_absent()

For the time being we cannot use ata_dev_present() as it was renamed
to ata_dev_enabled() but we still need presence test.  Implement
negation of the test.  Conveniently, the negated result is needed in
more places.  This is suggested by Jeff Garzik.

Signed-off-by: Tejun Heo <ccfba69985e72fbcd9ba8bbb6db43d42971ad06d@gmail.com>
Signed-off-by: Jeff Garzik <f3e731dfa293c7a83119d8aacfa41b5d2d780be9@garzik.org>

--- include/linux/libata.h
+++ include/linux/libata.h
@@ -682,6 +682,11 @@
 	return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP;
 }

+static inline unsigned int ata_class_absent(unsigned int class)
+{
+	return !ata_class_enabled(class) && !ata_class_disabled(class);
+}
+
 static inline unsigned int ata_dev_enabled(const struct ata_device *dev)
 {
 	return ata_class_enabled(dev->class);
@@ -690,6 +695,11 @@
 static inline unsigned int ata_dev_disabled(const struct ata_device *dev)
 {
 	return ata_class_disabled(dev->class);
+}
+
+static inline unsigned int ata_dev_absent(const struct ata_device *dev)
+{
+	return ata_class_absent(dev->class);
 }

 static inline u8 ata_chk_status(struct ata_port *ap)


AliSHILv2 added

AliSHILv2 added

--- STRUCT/STRUCTLinkDef.h
+++ STRUCT/STRUCTLinkDef.h
@@ -23,6 +23,7 @@
 #pragma link C++ class  AliPIPE+;
 #pragma link C++ class  AliPIPEv0+;
 #pragma link C++ class  AliPIPEv1+;
+#pragma link C++ class  AliPIPEv2+;
 #pragma link C++ class  AliPIPEv3+;
 #pragma link C++ class  AliSHIL+;
 #pragma link C++ class  AliSHILv0+;


[NET]: Correct dev_alloc_skb kerneldoc

[NET]: Correct dev_alloc_skb kerneldoc

dev_alloc_skb is designated for RX descriptors, not TX.  (Some drivers
use it for the latter anyway, but that's a different story)

Signed-off-by: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

--- include/linux/skbuff.h
+++ include/linux/skbuff.h
@@ -1067,7 +1067,7 @@
 }

 /**
- *	__dev_alloc_skb - allocate an skbuff for sending
+ *	__dev_alloc_skb - allocate an skbuff for receiving
  *	@length: length to allocate
  *	@gfp_mask: get_free_pages mask, passed to alloc_skb
  *
@@ -1088,7 +1088,7 @@
 }

 /**
- *	dev_alloc_skb - allocate an skbuff for sending
+ *	dev_alloc_skb - allocate an skbuff for receiving
  *	@length: length to allocate
  *
  *	Allocate a new &sk_buff and assign it a usage count of one. The


net: add skb_pop_rcv_encapsulation

net: add skb_pop_rcv_encapsulation

This function is used by UDP encapsulation protocols in RX when
crossing encapsulation boundary. If ip_summed is set to
CHECKSUM_UNNECESSARY and encapsulation is not set, change to
CHECKSUM_NONE since the checksum has not been validated within the
encapsulation. Clears csum_valid by the same rationale.

Signed-off-by: Tom Herbert <0786393240831fc3b5d6ed63658cfb1f3b1e6c40@google.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

--- include/linux/skbuff.h
+++ include/linux/skbuff.h
@@ -1854,6 +1854,18 @@
 	return pskb_may_pull(skb, skb_network_offset(skb) + len);
 }

+static inline void skb_pop_rcv_encapsulation(struct sk_buff *skb)
+{
+	/* Only continue with checksum unnecessary if device indicated
+	 * it is valid across encapsulation (skb->encapsulation was set).
+	 */
+	if (skb->ip_summed == CHECKSUM_UNNECESSARY && !skb->encapsulation)
+		skb->ip_summed = CHECKSUM_NONE;
+
+	skb->encapsulation = 0;
+	skb->csum_valid = 0;
+}
+
 /*
  * CPUs often take a performance hit when accessing unaligned memory
  * locations. The actual performance hit varies, it can be small if the


net: fix kmemcheck annotations

net: fix kmemcheck annotations

struct sk_buff kmemcheck annotations enlarged this structure by 8/16 bytes

Fix this by moving 'protocol' inside flags1 bitfield,
and queue_mapping inside flags2 bitfield.

Signed-off-by: Eric Dumazet <a0baddf32b28d2f9429941ed4af2fe636e210591@gmail.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

--- include/linux/skbuff.h
+++ include/linux/skbuff.h
@@ -354,8 +354,8 @@
 				ipvs_property:1,
 				peeked:1,
 				nf_trace:1;
+	__be16			protocol:16;
 	kmemcheck_bitfield_end(flags1);
-	__be16			protocol;

 	void			(*destructor)(struct sk_buff *skb);
 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
@@ -367,7 +367,6 @@
 #endif

 	int			iif;
-	__u16			queue_mapping;
 #ifdef CONFIG_NET_SCHED
 	__u16			tc_index;	/* traffic control index */
 #ifdef CONFIG_NET_CLS_ACT
@@ -376,6 +375,7 @@
 #endif

 	kmemcheck_bitfield_begin(flags2);
+	__u16			queue_mapping:16;
 #ifdef CONFIG_IPV6_NDISC_NODETYPE
 	__u8			ndisc_nodetype:2;
 #endif


[PATCH] ZVC: add __inc_zone_state for !SMP configuration

It turns out that there is a way to build a kernel with NUMA and no SMP.
In that case we are missing one definition __inc_zone_state.

Provide that missing __inc_zone_state.

(akpm: NUMA && !SMP sounds odd, but I am told "But there is the concept of
cpuless nodes.  A NUMA system without SMP has a single processor but multiple
memory nodes.  This used to work before on IA64 (wasn't aware of it, never seen
anyone with this kind of thing).")

Acked-by: Tony Luck <e7984595ec0368ff920a7b3521dc7093683f6f26@intel.com>
Signed-off-by: Christoph Lameter <a2610c5c148280bb6730402b12a8276c2f194fbe@sgi.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>

--- include/linux/vmstat.h
+++ include/linux/vmstat.h
@@ -186,11 +186,16 @@
 	zone_page_state_add(delta, zone, item);
 }

+static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
+{
+	atomic_long_inc(&zone->vm_stat[item]);
+	atomic_long_inc(&vm_stat[item]);
+}
+
 static inline void __inc_zone_page_state(struct page *page,
 			enum zone_stat_item item)
 {
-	atomic_long_inc(&page_zone(page)->vm_stat[item]);
-	atomic_long_inc(&vm_stat[item]);
+	__inc_zone_state(page_zone(page), item);
 }

 static inline void __dec_zone_page_state(struct page *page,


Improve the documentation of ASN.1 parsing functions

Document preconditions on parameters, values changed through pointers,
and error codes.

This commit leaves some issues regarding integers (especially negative
integers) open, because we don't have a policy decision on how to
handle them yet.

--- include/mbedtls/asn1.h
+++ include/mbedtls/asn1.h
@@ -176,119 +176,203 @@
  * \brief       Get the length of an ASN.1 element.
  *              Updates the pointer to immediately behind the length.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param len   The variable that will receive the value
- *
- * \return      0 if successful, MBEDTLS_ERR_ASN1_OUT_OF_DATA on reaching
- *              end of data, MBEDTLS_ERR_ASN1_INVALID_LENGTH if length is
- *              unparseable.
+ * \param p     On entry, \c *p points to the first byte of the length,
+ *              i.e. immediately after the tag.
+ *              On successful completion, \c *p points to the first byte
+ *              after the length, i.e. the first byte of the content.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param len   On successful completion, \c *len contains the lengtth
+ *              read from the ASN.1 input.
+ *
+ * \return      0 if successful.
+ * \return      #MBEDTLS_ERR_ASN1_OUT_OF_DATA if the ASN.1 element
+ *              would end beyond \p end.
+ * \return      #MBEDTLS_ERR_ASN1_INVALID_LENGTH if the length is unparseable.
  */
 int mbedtls_asn1_get_len( unsigned char **p,
-                  const unsigned char *end,
-                  size_t *len );
-
-/**
- * \brief       Get the tag and length of the tag. Check for the requested tag.
+                          const unsigned char *end,
+                          size_t *len );
+
+/**
+ * \brief       Get the tag and length of the element.
+ *              Check for the requested tag.
  *              Updates the pointer to immediately behind the tag and length.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param len   The variable that will receive the length
- * \param tag   The expected tag
- *
- * \return      0 if successful, MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if tag did
- *              not match requested tag, or another specific ASN.1 error code.
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p points to the first byte
+ *              after the length, i.e. the first byte of the content.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param len   On successful completion, \c *len contains the lengtth
+ *              read from the ASN.1 input.
+ * \param tag   The expected tag.
+ *
+ * \return      0 if successful.
+ * \return      #MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if the data does not start
+ *              with the requested tag.
+ * \return      #MBEDTLS_ERR_ASN1_OUT_OF_DATA if the ASN.1 element
+ *              would end beyond \p end.
+ * \return      #MBEDTLS_ERR_ASN1_INVALID_LENGTH if the length is unparseable.
  */
 int mbedtls_asn1_get_tag( unsigned char **p,
-                  const unsigned char *end,
-                  size_t *len, int tag );
+                          const unsigned char *end,
+                          size_t *len, int tag );

 /**
  * \brief       Retrieve a boolean ASN.1 tag and its value.
  *              Updates the pointer to immediately behind the full tag.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param val   The variable that will receive the value
- *
- * \return      0 if successful or a specific ASN.1 error code.
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p points to the first byte
+ *              beyond the ASN.1 element.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param val   On success, the parsed value (\c 0 or \c 1).
+ *
+ * \return      0 if successful.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 BOOLEAN.
  */
 int mbedtls_asn1_get_bool( unsigned char **p,
-                   const unsigned char *end,
-                   int *val );
+                           const unsigned char *end,
+                           int *val );

 /**
  * \brief       Retrieve an integer ASN.1 tag and its value.
  *              Updates the pointer to immediately behind the full tag.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param val   The variable that will receive the value
- *
- * \return      0 if successful or a specific ASN.1 error code.
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p points to the first byte
+ *              beyond the ASN.1 element.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param val   On success, the parsed value.
+ *
+ * \return      0 if successful.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 INTEGER.
+ * \return      #MBEDTLS_ERR_ASN1_INVALID_LENGTH if the parsed value does
+ *              not fit in an \c int.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 INTEGER.
  */
 int mbedtls_asn1_get_int( unsigned char **p,
-                  const unsigned char *end,
-                  int *val );
+                          const unsigned char *end,
+                          int *val );

 /**
  * \brief       Retrieve a bitstring ASN.1 tag and its value.
  *              Updates the pointer to immediately behind the full tag.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param bs    The variable that will receive the value
- *
- * \return      0 if successful or a specific ASN.1 error code.
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p is equal to \p end.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param bs    On success, ::mbedtls_asn1_bitstring information about
+ *              the parsed value.
+ *
+ * \return      0 if successful.
+ * \return      #MBEDTLS_ERR_ASN1_LENGTH_MISMATCH if the input contains
+ *              extra data after a valid BIT STRING.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 BIT STRING.
  */
 int mbedtls_asn1_get_bitstring( unsigned char **p, const unsigned char *end,
-                        mbedtls_asn1_bitstring *bs);
+                                mbedtls_asn1_bitstring *bs );

 /**
  * \brief       Retrieve a bitstring ASN.1 tag without unused bits and its
  *              value.
  *              Updates the pointer to the beginning of the bit/octet string.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param len   Length of the actual bit/octect string in bytes
- *
- * \return      0 if successful or a specific ASN.1 error code.
- */
-int mbedtls_asn1_get_bitstring_null( unsigned char **p, const unsigned char *end,
-                             size_t *len );
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p points to the first byte
+ *              of the content of the BIT STRING.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param len   On success, \c *len is the length of the content in bytes.
+ *
+ * \return      0 if successful.
+ * \return      #MBEDTLS_ERR_ASN1_INVALID_DATA if the input starts with
+ *              a valid BIT STRING with a nonzero number of unused bits.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 BIT STRING.
+ */
+int mbedtls_asn1_get_bitstring_null( unsigned char **p,
+                                     const unsigned char *end,
+                                     size_t *len );

 /**
  * \brief       Parses and splits an ASN.1 "SEQUENCE OF <tag>"
  *              Updated the pointer to immediately behind the full sequence tag.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param cur   First variable in the chain to fill
- * \param tag   Type of sequence
- *
- * \return      0 if successful or a specific ASN.1 error code.
+ * \note        On error, this function may return a partial list in \p cur.
+ *              You must set `cur->next = NULL` before calling this function!
+ *              Otherwise it is impossible to distinguish a previously non-null
+ *              pointer from a pointer to an object allocated by this function.
+ *
+ * \note        If the sequence is empty, this function does not modify
+ *              \c *cur. If the sequence is valid and non-empty, this
+ *              function sets `cur->buf.tag` to \p tag. This allows
+ *              callers to distinguish between an empty sequence and
+ *              a one-element sequence.
+ *
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p is equal to \p end.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param cur   A ::mbedtls_asn1_sequence which this function fills.
+ *              When this function returns, \c *cur is the head of a linked
+ *              list. Each node in this list is allocated with
+ *              mbedtls_calloc() apart from \p cur itself, and should
+ *              therefore be freed with mbedtls_free().
+ *              The list describes the content of the sequence.
+ *              The head of the list (i.e. \c *cur itself) describes the
+ *              first element, `*cur->next` describes the second element, etc.
+ *              For each element, `buf.tag == tag`, `buf.len` is the length
+ *              of the content of the content of the element, and `buf.p`
+ *              points to the first byte of the content (i.e. immediately
+ *              past the length of the element).
+ *              Note that list elements may be allocated even on error.
+ * \param tag   Each element of the sequence must have this tag.
+ *
+ * \return      0 if successful.
+ * \return      #MBEDTLS_ERR_ASN1_LENGTH_MISMATCH if the input contains
+ *              extra data after a valid SEQUENCE OF \p tag.
+ * \return      #MBEDTLS_ERR_ASN1_ALLOC_FAILED if a memory allocation failed.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 BIT STRING.
  */
 int mbedtls_asn1_get_sequence_of( unsigned char **p,
+                                  const unsigned char *end,
+                                  mbedtls_asn1_sequence *cur,
+                                  int tag );
+
+#if defined(MBEDTLS_BIGNUM_C)
+/**
+ * \brief       Retrieve an integer ASN.1 tag and its value.
+ *              Updates the pointer to immediately behind the full tag.
+ *
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p points to the first byte
+ *              beyond the ASN.1 element.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param X     On success, the parsed value.
+ *
+ * \return      0 if successful.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 INTEGER.
+ * \return      #MBEDTLS_ERR_ASN1_INVALID_LENGTH if the parsed value does
+ *              not fit in an \c int.
+ * \return      An MPI error code if the parsed value is too large.
+ * \return      An ASN.1 error code if the input does not start with
+ *              a valid ASN.1 INTEGER.
+ */
+int mbedtls_asn1_get_mpi( unsigned char **p,
                           const unsigned char *end,
-                          mbedtls_asn1_sequence *cur,
-                          int tag);
-
-#if defined(MBEDTLS_BIGNUM_C)
-/**
- * \brief       Retrieve a MPI value from an integer ASN.1 tag.
- *              Updates the pointer to immediately behind the full tag.
- *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param X     The MPI that will receive the value
- *
- * \return      0 if successful or a specific ASN.1 or MPI error code.
- */
-int mbedtls_asn1_get_mpi( unsigned char **p,
-                  const unsigned char *end,
-                  mbedtls_mpi *X );
+                          mbedtls_mpi *X );
 #endif /* MBEDTLS_BIGNUM_C */

 /**
@@ -296,10 +380,14 @@
  *              Updates the pointer to immediately behind the full
  *              AlgorithmIdentifier.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param alg   The buffer to receive the OID
- * \param params The buffer to receive the params (if any)
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p points to the first byte
+ *              beyond the AlgorithmIdentifier element.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param alg   The buffer to receive the OID.
+ * \param params The buffer to receive the parameters.
+ *              This is zeroized if there are no parameters.
  *
  * \return      0 if successful or a specific ASN.1 or MPI error code.
  */
@@ -313,9 +401,12 @@
  *              Updates the pointer to immediately behind the full
  *              AlgorithmIdentifier.
  *
- * \param p     The position in the ASN.1 data
- * \param end   End of data
- * \param alg   The buffer to receive the OID
+ * \param p     On entry, \c *p points to the start of the ASN.1 element.
+ *              On successful completion, \c *p points to the first byte
+ *              beyond the AlgorithmIdentifier element.
+ *              On error, the value of \c *p is undefined.
+ * \param end   End of data.
+ * \param alg   The buffer to receive the OID.
  *
  * \return      0 if successful or a specific ASN.1 or MPI error code.
  */
@@ -339,15 +430,19 @@
 /**
  * \brief       Free a mbedtls_asn1_named_data entry
  *
- * \param entry The named data entry to free
+ * \param entry The named data entry to free.
+ *              This function calls mbedtls_free() on
+ *              `entry->oid.p` and `entry->val.p`.
  */
 void mbedtls_asn1_free_named_data( mbedtls_asn1_named_data *entry );

 /**
- * \brief       Free all entries in a mbedtls_asn1_named_data list
- *              Head will be set to NULL
- *
- * \param head  Pointer to the head of the list of named data entries to free
+ * \brief       Free all entries in a mbedtls_asn1_named_data list.
+ *
+ * \param head  Pointer to the head of the list of named data entries to free.
+ *              This function calls mbedtls_asn1_free_named_data() and
+ *              mbedtls_free() on each list element and
+ *              sets \c *head to \c NULL.
  */
 void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head );


Documentation clue for anyone who wants to add debugger commands.

git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@8689 d31e2699-5ff4-0310-a27c-f18f2fbe73fe

--- include/parrot/debug.h
+++ include/parrot/debug.h
@@ -281,6 +281,12 @@
 void PDB_help(Interp *interpreter, const char *command);

 void PDB_backtrace(Interp *interpreter);
+
+/*
+ * These constants correspond to the debugger commands and are
+ * used in src/debug.c. To map command strings to their
+ * numeric values, use the algorithm from parse_command() in that file.
+ */

 #define c_b             25245
 #define c_c             25500


Moved data reference assignment operators into a macro.

--- sycl-gtx/implementation/data_ref.h
+++ sycl-gtx/implementation/data_ref.h
@@ -24,6 +24,12 @@
 	template <typename T, typename std::enable_if<std::is_arithmetic<T>::value>::type* = nullptr>	\
 	friend data_ref operator op(T n, data_ref dref) {												\
 		return data_ref(open_parenthesis + get_name(n) + " " #op " " + dref.name + ")");			\
+	}
+
+#define SYCL_ASSIGNMENT_OPERATOR(op, mode)				\
+	template <class T, is_compatible_t<T>* = nullptr>	\
+	data_ref& operator op(T n) {						\
+		return assign_<assign::mode>(n);				\
 	}

 class data_ref {
@@ -58,10 +64,7 @@
 	data_ref& operator=(data_ref dref) {
 		return assign_<assign::normal>(dref);
 	}
-	template <class T, is_compatible_t<T>* = nullptr>
-	data_ref& operator=(T n) {
-		return assign_<assign::normal>(n);
-	}
+	SYCL_ASSIGNMENT_OPERATOR(= , normal);

 	static string_class get_name(id<1> index);

@@ -101,3 +104,4 @@
 } // namespace cl

 #undef SYCL_DATA_REF_OPERATOR
+#undef SYCL_ASSIGNMENT_OPERATOR


Bumped the version to 0.1.10.

Bumped the version to 0.1.10.

--- include/siege/common.h
+++ include/siege/common.h
@@ -133,7 +133,7 @@
 /// @{
 #define SG_VERSION_MAJOR 0
 #define SG_VERSION_MINOR 1
-#define SG_VERSION_PATCH 9
+#define SG_VERSION_PATCH 10
 /**
  * \brief Version string
  *


lib: cbprintf: fix documentation errors

lib: cbprintf: fix documentation errors

A prototype missed the condition for its availability; another
documented arguments that are not present.

Signed-off-by: Peter Bigot <a4112a160b558d5427af084318038e19a95979ee@nordicsemi.no>

--- include/sys/cbprintf.h
+++ include/sys/cbprintf.h
@@ -98,6 +98,9 @@

 /** @brief snprintf using Zephyrs cbprintf infrastructure.
  *
+ * @note This function is available only when `CONFIG_CBPRINTF_LIBC_SUBSTS` is
+ * selected.
+ *
  * @note The functionality of this function is significantly reduced
  * when `CONFIG_CBPRINTF_NANO` is selected.
  *
@@ -112,7 +115,7 @@
  * @param ... arguments corresponding to the conversion specifications found
  * within @p format.
  *
- * return The number of characters that would have been written to @p
+ * @return The number of characters that would have been written to @p
  * str, excluding the terminating null byte.  This is greater than the
  * number actually written if @p size is too small.
  */
@@ -135,12 +138,9 @@
  * @param format a standard ISO C format string with characters and conversion
  * specifications.
  *
- * @param ... arguments corresponding to the conversion specifications found
- * within @p format.
- *
  * @param ap a reference to the values to be converted.
  *
- * return The number of characters that would have been written to @p
+ * @return The number of characters that would have been written to @p
  * str, excluding the terminating null byte.  This is greater than the
  * number actually written if @p size is too small.
  */


More tsumegos.

More tsumegos.

--- tsumego.c
+++ tsumego.c
@@ -323,6 +323,14 @@
 sscanf_state("9223372036854775807 787968 66060288 0 0 0 0 0 0", monkey_jump);
 monkey_jump->playing_area = rectangle(8, 3);
 monkey_jump->immortal = monkey_jump->opponent | monkey_jump->player;
+
+state cranes_nest_;
+state *cranes_nest = &cranes_nest_;
+sscanf_state("9223372036854775807 8721 2132585480192 0 0 0 0 0 0", cranes_nest);
+cranes_nest->playing_area = rectangle(5, 5);
+cranes_nest->immortal = cranes_nest->opponent | cranes_nest->player;
+cranes_nest->opponent |= east(rectangle(3, 1));
+cranes_nest->target = east(rectangle(3, 1));

 state corner_3x3_ = (state) {
     rectangle(6, 6),
@@ -421,10 +429,22 @@
 state *center_4x4 = &center_4x4_;
 center_4x4->target = center_4x4->player;

+state corner_5x3_;
+state *corner_5x3 = &corner_5x3_;
+sscanf_state("9223372036854775807 8985226235674752 8464121888 0 0 0 0 0 0", corner_5x3);
+corner_5x3->playing_area = rectangle(8, 6);
+corner_5x3->target = corner_5x3->opponent;
+corner_5x3->immortal = corner_5x3->player;
+
 state ring_5x5_ = (state) {
     rectangle(5, 5) ^ south(east(rectangle(3, 3)))
 };
 state *ring_5x5 = &ring_5x5_;
+
+state cut_5x4_ = (state) {
+    cross(south(east(rectangle(3, 2))))
+};
+state *cut_5x4 = &cut_5x4_;

 state target_test_ = (state) {
     rectangle(5, 1),
@@ -460,6 +480,7 @@
     {"xxqj100", xxqj100},
     {"monkey_connection", monkey_connection},
     {"monkey_jump", monkey_jump},
+    {"cranes_nest", cranes_nest},
     {"bulky_ten", bulky_ten},
     {"wut", wut},
     {"corner_3x3", corner_3x3},
@@ -470,7 +491,9 @@
     {"center_4x3", center_4x3},
     {"corner_14", corner_14},
     {"edge_14", edge_14},
+    {"corner_5x3", corner_5x3},
     {"ring_5x5", ring_5x5},
+    {"cut_5x4", cut_5x4},
     {"center_4x4", center_4x4},
     {"target_test", target_test},
     {"nakade_test", nakade_test},


add metadata to Click for views

add metadata to Click for views

--- include/views/SkView.h
+++ include/views/SkView.h
@@ -15,6 +15,7 @@
 #include "SkDOM.h"
 #include "SkTDict.h"
 #include "SkMatrix.h"
+#include "SkMetaData.h"

 class SkCanvas;
 class SkLayerView;
@@ -155,6 +156,8 @@
         SkIPoint    fIOrig, fIPrev, fICurr;
         State       fState;
         void*       fOwner;
+
+        SkMetaData  fMeta;
     private:
         SkEventSinkID   fTargetID;
         char*           fType;


Fixes to various bugs found during extensive testing

--- include/vk_mem_alloc.h
+++ include/vk_mem_alloc.h
@@ -5055,6 +5055,7 @@
 struct VmaAllocationRequest
 {
     VkDeviceSize offset;
+    VkDeviceSize size;
     VkDeviceSize sumFreeSize; // Sum size of free items that overlap with proposed allocation.
     VkDeviceSize sumItemSize; // Sum size of items to make lost that overlap with proposed allocation.
     VmaSuballocationList::iterator item;
@@ -5129,7 +5130,6 @@
     virtual void Alloc(
         const VmaAllocationRequest& request,
         VmaSuballocationType type,
-        VkDeviceSize allocSize,
         void* userData) = 0;

     // Frees suballocation assigned to given memory region.
@@ -5213,7 +5213,6 @@
     virtual void Alloc(
         const VmaAllocationRequest& request,
         VmaSuballocationType type,
-        VkDeviceSize allocSize,
         void* userData);

     virtual void FreeAtOffset(VkDeviceSize offset);
@@ -5397,7 +5396,6 @@
     virtual void Alloc(
         const VmaAllocationRequest& request,
         VmaSuballocationType type,
-        VkDeviceSize allocSize,
         void* userData);

     virtual void FreeAtOffset(VkDeviceSize offset);
@@ -5530,7 +5528,6 @@
     virtual void Alloc(
         const VmaAllocationRequest& request,
         VmaSuballocationType type,
-        VkDeviceSize allocSize,
         void* userData);

     virtual void FreeAtOffset(VkDeviceSize offset);
@@ -5541,8 +5538,6 @@
 private:
     static const size_t MAX_LEVELS = 48;

-    static VkDeviceSize AlignAllocationSize(VkDeviceSize size) { return VmaNextPow2(size); }
-
     struct ValidationContext
     {
         size_t calculatedAllocationCount = 0;
@@ -5600,6 +5595,14 @@
     // Doesn't include unusable size.
     VkDeviceSize m_SumFreeSize;

+    VkDeviceSize AlignAllocationSize(VkDeviceSize size) const
+    {
+        if(!IsVirtual())
+        {
+            size = VmaAlignUp(size, (VkDeviceSize)16);
+        }
+        return VmaNextPow2(size);
+    }
     VkDeviceSize GetUnusableSize() const { return GetSize() - m_UsableSize; }
     Node* FindAllocationNode(VkDeviceSize offset, uint32_t& outLevel);
     void DeleteNodeChildren(Node* node);
@@ -6545,7 +6548,7 @@

     void RemoveAllocation(uint32_t heapIndex, VkDeviceSize allocationSize)
     {
-        VMA_ASSERT(m_AllocationBytes[heapIndex] >= allocationSize); // DELME
+        VMA_ASSERT(m_AllocationBytes[heapIndex] >= allocationSize);
         m_AllocationBytes[heapIndex] -= allocationSize;
 #if VMA_MEMORY_BUDGET
         ++m_OperationsSinceBudgetFetch;
@@ -8047,8 +8050,9 @@
     allocSize = AlignAllocationSize(allocSize);

     pAllocationRequest->type = VmaAllocationRequestType::Normal;
-
-    // There is not enough total free space in this block to fullfill the request: Early return.
+    pAllocationRequest->size = allocSize;
+
+    // There is not enough total free space in this block to fulfill the request: Early return.
     if(canMakeOtherLost == false &&
         m_SumFreeSize < allocSize + 2 * VMA_DEBUG_MARGIN)
     {
@@ -8148,6 +8152,7 @@
         bool found = false;
         VmaAllocationRequest tmpAllocRequest = {};
         tmpAllocRequest.type = VmaAllocationRequestType::Normal;
+        tmpAllocRequest.size = allocSize;
         for(VmaSuballocationList::iterator suballocIt = m_Suballocations.begin();
             suballocIt != m_Suballocations.end();
             ++suballocIt)
@@ -8272,11 +8277,8 @@
 void VmaBlockMetadata_Generic::Alloc(
     const VmaAllocationRequest& request,
     VmaSuballocationType type,
-    VkDeviceSize allocSize,
     void* userData)
 {
-    allocSize = AlignAllocationSize(allocSize);
-
     VMA_ASSERT(request.type == VmaAllocationRequestType::Normal);
     VMA_ASSERT(request.item != m_Suballocations.end());
     VmaSuballocation& suballoc = *request.item;
@@ -8285,15 +8287,15 @@
     // Given offset is inside this suballocation.
     VMA_ASSERT(request.offset >= suballoc.offset);
     const VkDeviceSize paddingBegin = request.offset - suballoc.offset;
-    VMA_ASSERT(suballoc.size >= paddingBegin + allocSize);
-    const VkDeviceSize paddingEnd = suballoc.size - paddingBegin - allocSize;
+    VMA_ASSERT(suballoc.size >= paddingBegin + request.size);
+    const VkDeviceSize paddingEnd = suballoc.size - paddingBegin - request.size;

     // Unregister this free suballocation from m_FreeSuballocationsBySize and update
     // it to become used.
     UnregisterFreeSuballocation(request.item);

     suballoc.offset = request.offset;
-    suballoc.size = allocSize;
+    suballoc.size = request.size;
     suballoc.type = type;
     suballoc.userData = userData;

@@ -8301,7 +8303,7 @@
     if(paddingEnd)
     {
         VmaSuballocation paddingSuballoc = {};
-        paddingSuballoc.offset = request.offset + allocSize;
+        paddingSuballoc.offset = request.offset + request.size;
         paddingSuballoc.size = paddingEnd;
         paddingSuballoc.type = VMA_SUBALLOCATION_TYPE_FREE;
         VmaSuballocationList::iterator next = request.item;
@@ -8333,7 +8335,7 @@
     {
         ++m_FreeCount;
     }
-    m_SumFreeSize -= allocSize;
+    m_SumFreeSize -= request.size;
 }

 void VmaBlockMetadata_Generic::FreeAtOffset(VkDeviceSize offset)
@@ -9756,6 +9758,7 @@
     VMA_ASSERT(allocType != VMA_SUBALLOCATION_TYPE_FREE);
     VMA_ASSERT(pAllocationRequest != VMA_NULL);
     VMA_HEAVY_ASSERT(Validate());
+    pAllocationRequest->size = allocSize;
     return upperAddress ?
         CreateAllocationRequest_UpperAddress(
             currentFrameIndex, frameInUseCount, bufferImageGranularity,
@@ -9776,7 +9779,7 @@
     uint32_t strategy,
     VmaAllocationRequest* pAllocationRequest)
 {
-    const VkDeviceSize size = GetSize();
+    const VkDeviceSize blockSize = GetSize();
     SuballocationVectorType& suballocations1st = AccessSuballocations1st();
     SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();

@@ -9787,11 +9790,11 @@
     }

     // Try to allocate before 2nd.back(), or end of block if 2nd.empty().
-    if(allocSize > size)
+    if(allocSize > blockSize)
     {
         return false;
     }
-    VkDeviceSize resultBaseOffset = size - allocSize;
+    VkDeviceSize resultBaseOffset = blockSize - allocSize;
     if(!suballocations2nd.empty())
     {
         const VmaSuballocation& lastSuballoc = suballocations2nd.back();
@@ -9896,7 +9899,7 @@
     uint32_t strategy,
     VmaAllocationRequest* pAllocationRequest)
 {
-    const VkDeviceSize size = GetSize();
+    const VkDeviceSize blockSize = GetSize();
     SuballocationVectorType& suballocations1st = AccessSuballocations1st();
     SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();

@@ -9950,7 +9953,7 @@
         }

         const VkDeviceSize freeSpaceEnd = m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK ?
-            suballocations2nd.back().offset : size;
+            suballocations2nd.back().offset : blockSize;

         // There is enough free space at the end after alignment.
         if(resultOffset + allocSize + VMA_DEBUG_MARGIN <= freeSpaceEnd)
@@ -10109,7 +10112,7 @@

             // Special case: There is not enough room at the end for this allocation, even after making all from the 1st lost.
             if(index1st == suballocations1st.size() &&
-                resultOffset + allocSize + VMA_DEBUG_MARGIN > size)
+                resultOffset + allocSize + VMA_DEBUG_MARGIN > blockSize)
             {
                 // TODO: This is a known bug that it's not yet implemented and the allocation is failing.
                 VMA_DEBUG_LOG("Unsupported special case in custom pool with linear allocation algorithm used as ring buffer with allocations that can be lost.");
@@ -10117,7 +10120,7 @@
         }

         // There is enough free space at the end after alignment.
-        if((index1st == suballocations1st.size() && resultOffset + allocSize + VMA_DEBUG_MARGIN <= size) ||
+        if((index1st == suballocations1st.size() && resultOffset + allocSize + VMA_DEBUG_MARGIN <= blockSize) ||
             (index1st < suballocations1st.size() && resultOffset + allocSize + VMA_DEBUG_MARGIN <= suballocations1st[index1st].offset))
         {
             // Check next suballocations for BufferImageGranularity conflicts.
@@ -10147,7 +10150,7 @@
             // All tests passed: Success.
             pAllocationRequest->offset = resultOffset;
             pAllocationRequest->sumFreeSize =
-                (index1st < suballocations1st.size() ? suballocations1st[index1st].offset : size)
+                (index1st < suballocations1st.size() ? suballocations1st[index1st].offset : blockSize)
                 - resultBaseOffset
                 - pAllocationRequest->sumItemSize;
             pAllocationRequest->type = VmaAllocationRequestType::EndOf2nd;
@@ -10320,10 +10323,9 @@
 void VmaBlockMetadata_Linear::Alloc(
     const VmaAllocationRequest& request,
     VmaSuballocationType type,
-    VkDeviceSize allocSize,
     void* userData)
 {
-    const VmaSuballocation newSuballoc = { request.offset, allocSize, userData, type };
+    const VmaSuballocation newSuballoc = { request.offset, request.size, userData, type };

     switch(request.type)
     {
@@ -10343,7 +10345,7 @@
             VMA_ASSERT(suballocations1st.empty() ||
                 request.offset >= suballocations1st.back().offset + suballocations1st.back().size);
             // Check if it fits before the end of the block.
-            VMA_ASSERT(request.offset + allocSize <= GetSize());
+            VMA_ASSERT(request.offset + request.size <= GetSize());

             suballocations1st.push_back(newSuballoc);
         }
@@ -10353,7 +10355,7 @@
             SuballocationVectorType& suballocations1st = AccessSuballocations1st();
             // New allocation at the end of 2-part ring buffer, so before first allocation from 1st vector.
             VMA_ASSERT(!suballocations1st.empty() &&
-                request.offset + allocSize <= suballocations1st[m_1stNullItemsBeginCount].offset);
+                request.offset + request.size <= suballocations1st[m_1stNullItemsBeginCount].offset);
             SuballocationVectorType& suballocations2nd = AccessSuballocations2nd();

             switch(m_2ndVectorMode)
@@ -10785,7 +10787,6 @@

 void VmaBlockMetadata_Buddy::PrintDetailedMap(class VmaJsonWriter& json) const
 {
-    // TODO optimize - this was already calculated.
     VmaStatInfo stat;
     CalcAllocationStatInfo(stat);

@@ -10842,7 +10843,7 @@
     }

     const uint32_t targetLevel = AllocSizeToLevel(allocSize);
-    for(uint32_t level = targetLevel + 1; level--; )
+    for(uint32_t level = targetLevel; level--; )
     {
         for(Node* freeNode = m_FreeList[level].front;
             freeNode != VMA_NULL;
@@ -10852,6 +10853,7 @@
             {
                 pAllocationRequest->type = VmaAllocationRequestType::Normal;
                 pAllocationRequest->offset = freeNode->offset;
+                pAllocationRequest->size = allocSize;
                 pAllocationRequest->sumFreeSize = LevelToNodeSize(level);
                 pAllocationRequest->sumItemSize = 0;
                 pAllocationRequest->itemsToMakeLostCount = 0;
@@ -10888,14 +10890,11 @@
 void VmaBlockMetadata_Buddy::Alloc(
     const VmaAllocationRequest& request,
     VmaSuballocationType type,
-    VkDeviceSize allocSize,
     void* userData)
 {
-    allocSize = AlignAllocationSize(allocSize);
-
     VMA_ASSERT(request.type == VmaAllocationRequestType::Normal);

-    const uint32_t targetLevel = AllocSizeToLevel(allocSize);
+    const uint32_t targetLevel = AllocSizeToLevel(request.size);
     uint32_t currLevel = (uint32_t)(uintptr_t)request.customData;

     Node* currNode = m_FreeList[currLevel].front;
@@ -10938,7 +10937,6 @@
         AddToFreeListFront(childrenLevel, leftChild);

         ++m_FreeCount;
-        //m_SumFreeSize -= LevelToNodeSize(currLevel) % 2; // Useful only when level node sizes can be non power of 2.
         ++currLevel;
         currNode = m_FreeList[currLevel].front;

@@ -10960,7 +10958,7 @@

     ++m_AllocationCount;
     --m_FreeCount;
-    m_SumFreeSize -= allocSize;
+    m_SumFreeSize -= request.size;
 }

 void VmaBlockMetadata_Buddy::GetAllocationInfo(VkDeviceSize offset, VmaVirtualAllocationInfo& outInfo)
@@ -11007,18 +11005,18 @@
     VkDeviceSize levelNodeSize = LevelToNodeSize(0);
     while(node->type == Node::TYPE_SPLIT)
     {
-        const VkDeviceSize nextLevelSize = levelNodeSize >> 1;
-        if(offset < nodeOffset + nextLevelSize)
+        const VkDeviceSize nextLevelNodeSize = levelNodeSize >> 1;
+        if(offset < nodeOffset + nextLevelNodeSize)
         {
             node = node->split.leftChild;
         }
         else
         {
             node = node->split.leftChild->buddy;
-            nodeOffset += nextLevelSize;
+            nodeOffset += nextLevelNodeSize;
         }
         ++outLevel;
-        levelNodeSize = nextLevelSize;
+        levelNodeSize = nextLevelNodeSize;
     }

     VMA_ASSERT(node != VMA_NULL && node->type == Node::TYPE_ALLOCATION);
@@ -11048,7 +11046,7 @@
     case Node::TYPE_SPLIT:
         {
             const uint32_t childrenLevel = level + 1;
-            const VkDeviceSize childrenLevelNodeSize = levelNodeSize / 2;
+            const VkDeviceSize childrenLevelNodeSize = levelNodeSize >> 1;
             const Node* const leftChild = curr->split.leftChild;
             VMA_VALIDATE(leftChild != VMA_NULL);
             VMA_VALIDATE(leftChild->offset == curr->offset);
@@ -11080,8 +11078,8 @@
     while(allocSize <= nextLevelNodeSize && level + 1 < m_LevelCount)
     {
         ++level;
-        currLevelNodeSize = nextLevelNodeSize;
-        nextLevelNodeSize = currLevelNodeSize >> 1;
+        currLevelNodeSize >>= 1;
+        nextLevelNodeSize >>= 1;
     }
     return level;
 }
@@ -11109,7 +11107,6 @@

         node = parent;
         --level;
-        //m_SumFreeSize += LevelToNodeSize(level) % 2; // Useful only when level node sizes can be non power of 2.
         --m_FreeCount;
     }

@@ -11977,13 +11974,13 @@
                 {
                     // Allocate from this pBlock.
                     *pAllocation = m_hAllocator->m_AllocationObjectAllocator.Allocate(currentFrameIndex, isUserDataString);
-                    pBestRequestBlock->m_pMetadata->Alloc(bestRequest, suballocType, size, *pAllocation);
+                    pBestRequestBlock->m_pMetadata->Alloc(bestRequest, suballocType, *pAllocation);
                     UpdateHasEmptyBlock();
                     (*pAllocation)->InitBlockAllocation(
                         pBestRequestBlock,
                         bestRequest.offset,
                         alignment,
-                        size,
+                        bestRequest.size, // Not size, as actual allocation size may be larger than requested!
                         m_MemoryTypeIndex,
                         suballocType,
                         mapped,
@@ -11991,14 +11988,14 @@
                     VMA_HEAVY_ASSERT(pBestRequestBlock->Validate());
                     VMA_DEBUG_LOG("    Returned from existing block #%u", pBestRequestBlock->GetId());
                     (*pAllocation)->SetUserData(m_hAllocator, createInfo.pUserData);
-                    m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), size);
+                    m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), bestRequest.size);
                     if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
                     {
                         m_hAllocator->FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED);
                     }
                     if(IsCorruptionDetectionEnabled())
                     {
-                        VkResult res = pBestRequestBlock->WriteMagicValueAroundAllocation(m_hAllocator, bestRequest.offset, size);
+                        VkResult res = pBestRequestBlock->WriteMagicValueAroundAllocation(m_hAllocator, bestRequest.offset, bestRequest.size);
                         VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to write magic value.");
                     }
                     return VK_SUCCESS;
@@ -12181,27 +12178,27 @@
         }

         *pAllocation = m_hAllocator->m_AllocationObjectAllocator.Allocate(currentFrameIndex, isUserDataString);
-        pBlock->m_pMetadata->Alloc(currRequest, suballocType, size, *pAllocation);
+        pBlock->m_pMetadata->Alloc(currRequest, suballocType, *pAllocation);
         UpdateHasEmptyBlock();
         (*pAllocation)->InitBlockAllocation(
             pBlock,
             currRequest.offset,
             alignment,
-            size,
+            currRequest.size, // Not size, as actual allocation size may be larger than requested!
             m_MemoryTypeIndex,
             suballocType,
             mapped,
             (allocFlags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0);
         VMA_HEAVY_ASSERT(pBlock->Validate());
         (*pAllocation)->SetUserData(m_hAllocator, pUserData);
-        m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), size);
+        m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), currRequest.size);
         if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
         {
             m_hAllocator->FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED);
         }
         if(IsCorruptionDetectionEnabled())
         {
-            VkResult res = pBlock->WriteMagicValueAroundAllocation(m_hAllocator, currRequest.offset, size);
+            VkResult res = pBlock->WriteMagicValueAroundAllocation(m_hAllocator, currRequest.offset, currRequest.size);
             VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to write magic value.");
         }
         return VK_SUCCESS;
@@ -13033,11 +13030,7 @@

                 moves.push_back(move);

-                pDstBlockInfo->m_pBlock->m_pMetadata->Alloc(
-                    dstAllocRequest,
-                    suballocType,
-                    size,
-                    allocInfo.m_hAllocation);
+                pDstBlockInfo->m_pBlock->m_pMetadata->Alloc(dstAllocRequest, suballocType, allocInfo.m_hAllocation);

                 if(freeOldAllocations)
                 {
@@ -16743,7 +16736,6 @@
     {
         m_Metadata->Alloc(request,
             VMA_SUBALLOCATION_TYPE_UNKNOWN, // type - unimportant
-            createInfo.size, // allocSize
             createInfo.pUserData);
         outOffset = request.offset;
         return VK_SUCCESS;


- fixed : misspelled #define

- fixed : misspelled #define

--- indra/llui/llhunspell.h
+++ indra/llui/llhunspell.h
@@ -14,8 +14,8 @@
  *
  */

-#ifndef LLHUNSPELL_H
-#define LLHUNSLL_H
+#ifndef LL_HUNSPELL_H
+#define LL_HUNSPELL_H

 #include "llsingleton.h"
 #include <boost/signals2.hpp>
@@ -80,4 +80,4 @@

 // ============================================================================

-#endif // LLHUNSPELL_H
+#endif // LL_HUNSPELL_H


Enabled verbose mode temporarily for debugging a strange QA failure on Windows.

--- security/nss/cmd/tstclnt/tstclnt.c
+++ security/nss/cmd/tstclnt/tstclnt.c
@@ -138,7 +138,7 @@
 };

 unsigned long __cmp_umuls;
-PRBool verbose;
+PRBool verbose = 1;  /* enable verbose mode temporarily for debugging (wtc) */

 static char *progName;


issue 4: (Linux) invert offset/sent return values; return the right type depending on large file support.

--- sendfilemodule.c
+++ sendfilemodule.c
@@ -22,6 +22,7 @@
    02111-1307 USA.  */

 #include <Python.h>
+#include <stdlib.h>

 #if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/types.h>
@@ -106,9 +107,9 @@
                 string = headerlist;
             } else {
                 //printf("found list\n");
-                string = PyList_GET_ITEM(headerlist, i);
-            }
-            buf = (char *) PyString_AsString(string);
+                string = PyList_GET_ITEM(headerlist, i);
+            }
+            buf = (char *) PyString_AsString(string);
             //printf("buf: %s\n", buf);
             header_iovs[i].iov_base = buf;
             header_iovs[i].iov_len = PyString_GET_SIZE(string);
@@ -121,7 +122,7 @@
                 string = footerlist;
             } else {
                 //printf("found list\n");
-                string = PyList_GET_ITEM(footerlist, i);
+                string = PyList_GET_ITEM(footerlist, i);
             }
             buf = (char *) PyString_AsString(string);
             //printf("buf: %s\n", buf);
@@ -171,7 +172,7 @@
     struct sf_parms sf_iobuf;
     int rc;

-    if (!PyArg_ParseTuple(args, "iiLk|s#s#",
+    if (!PyArg_ParseTuple(args, "iiLk|s#s#",
                           &out_fd, &in_fd, &offset, &count, &hdr, &hdrsize,
 			  &trail, &trailsize))
         return NULL;
@@ -195,7 +196,7 @@
     sf_iobuf.file_descriptor = in_fd;
     sf_iobuf.file_offset = offset;
     sf_iobuf.file_bytes = count;
-
+
     Py_BEGIN_ALLOW_THREADS;
     do {
 	sf_iobuf.bytes_sent = 0; /* Really needed? */
@@ -210,12 +211,12 @@
         PyErr_SetFromErrno(PyExc_OSError);
         return NULL;
     } else {
-        return Py_BuildValue("Lk", offset, sts);
-    }
-}
-
-
-#else /* Linux, should be better check */
+        return Py_BuildValue("kL", sts, offset);
+    }
+}
+
+
+#else /* XXX - Linux, should be better checked */
 #include <sys/sendfile.h>

 static PyObject *
@@ -228,16 +229,19 @@

     if (!PyArg_ParseTuple(args, "iiLk", &out_fd, &in_fd, &offset, &count))
         return NULL;
-
+
     Py_BEGIN_ALLOW_THREADS;
     sts = sendfile(out_fd, in_fd, (off_t *) &offset, (ssize_t) count);
     Py_END_ALLOW_THREADS;
     if (sts == -1) {
         PyErr_SetFromErrno(PyExc_OSError);
         return NULL;
-    } else {
-        return Py_BuildValue("Lk", offset, sts);
-    }
+    }
+#if !defined(HAVE_LARGEFILE_SUPPORT)
+    return Py_BuildValue("lL", sts, offset);
+#else
+    return Py_BuildValue("LL", sts, offset);
+#endif
 }

 #endif


Fix deadlock

Fix deadlock

--- include/vlc_playlist.h
+++ include/vlc_playlist.h
@@ -465,12 +465,7 @@
 #define playlist_CurrentSize( obj ) obj->p_libvlc->p_playlist->current.i_size

 /** Ask the playlist to do some work */
-static inline void playlist_Signal( playlist_t *p_playlist )
-{
-    PL_LOCK;
-    vlc_object_signal( p_playlist );
-    PL_UNLOCK;
-}
+#define playlist_Signal( p_playlist ) vlc_object_signal( p_playlist )

 /** @} */
 # ifdef __cplusplus


Back out rev 1.27, which turned verbose mode on by default for debugging QA test script failures that only occurred on tinderbox machines. bug 207313 is now fixed.

--- security/nss/cmd/tstclnt/tstclnt.c
+++ security/nss/cmd/tstclnt/tstclnt.c
@@ -138,7 +138,7 @@
 };

 unsigned long __cmp_umuls;
-PRBool verbose = 1;  /* enable verbose mode temporarily for debugging (wtc) */
+PRBool verbose;

 static char *progName;


The merge accidentally lost the C++ wrappers and os_types.h include in codec.h
Fixed

Monty

git-svn-id: 03f0f1727258f1959b7b485b30a676bafdb78148@448 0101bb08-14d6-0310-b084-bc0e0c8e3800

--- include/vorbis/codec.h
+++ include/vorbis/codec.h
@@ -12,16 +12,22 @@
  ********************************************************************

  function: libvorbis codec headers
- last mod: $Id: codec.h,v 1.17 2000/06/14 10:13:35 xiphmont Exp $
+ last mod: $Id: codec.h,v 1.18 2000/06/14 22:41:53 xiphmont Exp $

  ********************************************************************/

 #ifndef _vorbis_codec_h_
 #define _vorbis_codec_h_

+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
 #define MAX_BARK 27

 #include <sys/types.h>
+#include "os_types.h"
 #include "vorbis/codebook.h"
 #include "vorbis/internal.h"

@@ -425,5 +431,9 @@
 extern int      vorbis_synthesis_pcmout(vorbis_dsp_state *v,double ***pcm);
 extern int      vorbis_synthesis_read(vorbis_dsp_state *v,int samples);

+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif


Bug 158750: Fix the incorrect "End of Version 3.0xx" comments, found by comparing with "cvs diff -u -rNSS_3_12_2_RTM -rNSS_3_12_3_RTM loader.h".

--- security/nss/lib/freebl/ldvector.c
+++ security/nss/lib/freebl/ldvector.c
@@ -251,19 +251,15 @@
     SEED_Encrypt,
     SEED_Decrypt,

-    /* End of Version 3.011. */
-
     BL_Init,
     BL_SetForkState,
-
-    /* End of Version 3.012. */

     PRNGTEST_Instantiate,
     PRNGTEST_Reseed,
     PRNGTEST_Generate,
     PRNGTEST_Uninstantiate

-    /* End of Version 3.013. */
+    /* End of Version 3.011. */
 };

 const FREEBLVector *


serial: minor code cleanup

serial: minor code cleanup

--- serial/manager.c
+++ serial/manager.c
@@ -258,10 +258,9 @@
 static void open_notify(int fd, int err, void *data)
 {
 	char port_name[16];
-	const char *pname = port_name;
-	const char *owner;
+	const char *owner, *pname = port_name;
+	struct pending_connect *pc = data;
 	DBusMessage *reply;
-	struct pending_connect *pc = data;
 	bdaddr_t dst;

 	if (err) {
@@ -499,8 +498,7 @@
 		goto fail;
 	}
 	if (dbus_message_has_member(pc->msg, "CreatePort")) {
-		char path[MAX_PATH_LENGTH];
-		char port_name[16];
+		char path[MAX_PATH_LENGTH], port_name[16];
 		const char *ppath = path;
 		sdp_data_t *d;
 		char *svcname = NULL;
@@ -722,12 +720,10 @@
 	DBusMessage *reply;
 	DBusError derr;
 	bdaddr_t src, dst;
-	char path[MAX_PATH_LENGTH];
+	char path[MAX_PATH_LENGTH], port_name[16], uuid[37];
 	const char *bda, *pattern, *ppath = path;
 	long val;
 	int dev_id, err;
-	char port_name[16];
-	char uuid[37];

 	dbus_error_init(&derr);
 	if (!dbus_message_get_args(msg, &derr,
@@ -1129,13 +1125,15 @@

 	snprintf(port_name, sizeof(port_name), "/dev/rfcomm%d", id);

-	port_register(connection, id, &dst, port_name, path);
+	if (port_register(connection, id, &dst, port_name, path) < 0) {
+		rfcomm_release(id);
+		return;
+	}

 	dbus_connection_emit_signal(connection, SERIAL_MANAGER_PATH,
 			SERIAL_MANAGER_INTERFACE, "PortCreated" ,
 			DBUS_TYPE_STRING, &ppath,
 			DBUS_TYPE_INVALID);
-
 }

 static void register_stored_ports(void)


Remove accidental timeout in shell module

--- include/znc/ExecSock.h
+++ include/znc/ExecSock.h
@@ -24,7 +24,7 @@
 //! @author imaginos@imaginos.net
 class CExecSock : public CZNCSock {
 public:
-	CExecSock() : CZNCSock() {
+	CExecSock() : CZNCSock(0) {
 		m_iPid = -1;
 	}


reuse intermediate multiplication values when decrypting; speeds up decryption in the RIJNDAEL_GENERATE_VALUES case by 60%. (todo: something similar with RIJNDAEL_GENERATE_VALUES_MACRO)

--- security/nss/lib/freebl/rijndael.c
+++ security/nss/lib/freebl/rijndael.c
@@ -212,9 +212,46 @@
     ( WORD4( GFM09(i), GFM0D(i), GFM0B(i), GFM0E(i) ) )

 /* Now choose the T-table indexing method */
-#if defined(RIJNDAEL_GENERATE_VALUES) ||  \
-    defined(RIJNDAEL_GENERATE_VALUES_MACRO)
-/* generate values for the tables */
+#if defined(RIJNDAEL_GENERATE_VALUES)
+/* generate values for the tables with a function*/
+static PRUint32 gen_TInvXi(PRUint8 tx, PRUint8 i)
+{
+    PRUint8 si01, si02, si03, si04, si08, si09, si0B, si0D, si0E;
+    si01 = SINV(i);
+    si02 = XTIME(si01);
+    si04 = XTIME(si02);
+    si08 = XTIME(si04);
+    si03 = si02 ^ si01;
+    si09 = si08 ^ si01;
+    si0B = si08 ^ si03;
+    si0D = si09 ^ si04;
+    si0E = si08 ^ si04 ^ si02;
+    switch (tx) {
+    case 0:
+	return WORD4(si0E, si09, si0D, si0B);
+    case 1:
+	return WORD4(si0B, si0E, si09, si0D);
+    case 2:
+	return WORD4(si0D, si0B, si0E, si09);
+    case 3:
+	return WORD4(si09, si0D, si0B, si0E);
+    }
+    return -1;
+}
+#define T0(i)    G_T0(i)
+#define T1(i)    G_T1(i)
+#define T2(i)    G_T2(i)
+#define T3(i)    G_T3(i)
+#define TInv0(i) gen_TInvXi(0, i)
+#define TInv1(i) gen_TInvXi(1, i)
+#define TInv2(i) gen_TInvXi(2, i)
+#define TInv3(i) gen_TInvXi(3, i)
+#define IMXC0(b) G_IMXC0(b)
+#define IMXC1(b) G_IMXC1(b)
+#define IMXC2(b) G_IMXC2(b)
+#define IMXC3(b) G_IMXC3(b)
+#elif defined(RIJNDAEL_GENERATE_VALUES_MACRO)
+/* generate values for the tables with macros */
 #define T0(i)    G_T0(i)
 #define T1(i)    G_T1(i)
 #define T2(i)    G_T2(i)
@@ -268,19 +305,34 @@
 init_rijndael_tables(void)
 {
     PRUint32 i;
+    PRUint8 si01, si02, si03, si04, si08, si09, si0B, si0D, si0E;
     struct rijndael_tables_str *rts;
     rts = (struct rijndael_tables_str *)
                    PORT_Alloc(sizeof(struct rijndael_tables_str));
     if (!rts) return PR_FAILURE;
     for (i=0; i<256; i++) {
-	rts->T0[i] = G_T0(i);
-	rts->T1[i] = G_T1(i);
-	rts->T2[i] = G_T2(i);
-	rts->T3[i] = G_T3(i);
-	rts->TInv0[i] = G_TInv0(i);
-	rts->TInv1[i] = G_TInv1(i);
-	rts->TInv2[i] = G_TInv2(i);
-	rts->TInv3[i] = G_TInv3(i);
+	/* The forward values */
+	si01 = SBOX(i);
+	si02 = XTIME(si01);
+	si03 = si02 ^ si01;
+	rts->T0[i] = WORD4(si02, si01, si01, si03);
+	rts->T1[i] = WORD4(si03, si02, si01, si01);
+	rts->T2[i] = WORD4(si01, si03, si02, si01);
+	rts->T3[i] = WORD4(si01, si01, si03, si02);
+	/* The inverse values */
+	si01 = SINV(i);
+	si02 = XTIME(si01);
+	si04 = XTIME(si02);
+	si08 = XTIME(si04);
+	si03 = si02 ^ si01;
+	si09 = si08 ^ si01;
+	si0B = si08 ^ si03;
+	si0D = si09 ^ si04;
+	si0E = si08 ^ si04 ^ si02;
+	rts->TInv0[i] = WORD4(si0E, si09, si0D, si0B);
+	rts->TInv1[i] = WORD4(si0B, si0E, si09, si0D);
+	rts->TInv2[i] = WORD4(si0D, si0B, si0E, si09);
+	rts->TInv3[i] = WORD4(si09, si0D, si0B, si0E);
     }
     /* wait until all the values are in to set */
     rijndaelTables = rts;


Update Hover and Navigation controllers

Update Hover and Navigation controllers

--- control/navigation_default_config.h
+++ control/navigation_default_config.h
@@ -81,7 +81,7 @@
 	},
 	.hovering_controller =
 	{
-		.p_gain = 0.2f,
+		.p_gain = 0.4f,
 		.clip_min = 0.0f,
 		.clip_max = 3.0f,
 		.integrator={


test: Ignore too new warnings

test: Ignore too new warnings

There is an explicit check for the version

Acked-by: Frediano Ziglio <55d48b080b2e443e395cde84d2c83b135a4ff48e@redhat.com>

--- server/tests/test-codecs-parsing.c
+++ server/tests/test-codecs-parsing.c
@@ -54,6 +54,7 @@

 /* g_test_expect_message is available since Glib 2.34 */
 #if GLIB_CHECK_VERSION(2, 34, 0)
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void codecs_bad(void)
 {
     guint i;
@@ -116,6 +117,7 @@

     spice_server_destroy(server);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 #endif

 int main(int argc, char *argv[])


LogTableTail iface

LogTableTail iface

error: pathspec 'fnord-eventdb/LogTableTail.h' did not match any file(s) known to git

--- fnord-eventdb/LogTableTail.h
+++ fnord-eventdb/LogTableTail.h
@@ -0,0 +1,51 @@
+/**
+ * This file is part of the "libfnord" project
+ *   Copyright (c) 2015 Paul Asmuth
+ *
+ * FnordMetric is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License v3.0. You should have received a
+ * copy of the GNU General Public License along with this program. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+#ifndef _FNORD_EVENTDB_TABLEREADER_H
+#define _FNORD_EVENTDB_TABLEREADER_H
+#include <fnord-base/stdtypes.h>
+#include <fnord-base/autoref.h>
+#include <fnord-msg/MessageSchema.h>
+#include <fnord-msg/MessageObject.h>
+#include <fnord-eventdb/TableArena.h>
+#include <fnord-eventdb/TableSnapshot.h>
+#include "fnord-sstable/sstablereader.h"
+#include "fnord-cstable/CSTableReader.h"
+
+namespace fnord {
+namespace eventdb {
+
+struct LogTableTailOffset {
+  String replica_id;
+  uint64_t consumed_offset;
+};
+
+typedef Vector<LogTableTailOffset> LogTableTailCursor;
+
+class LogTableTail : public RefCounted {
+public:
+
+  LogTableTail(RefPtr<TableReader> reader);
+  LogTableTail(RefPtr<TableReader> reader, LogTableTailCursor cursor);
+
+  bool fetchNext(
+      Function<bool (const msg::MessageObject& record)> fn,
+      size_t limit = -1);
+
+  LogTableTailCursor getCursor() const;
+
+protected:
+  RefPtr<TableReader> reader_;
+  HashMap<String, uint64_t> offsets_;
+};
+
+} // namespace eventdb
+} // namespace fnord
+
+#endif


buf0buf.c:   Fix a bug: InnoDB could in a crash recovery print a big false corruption warning if the first page of an ibdata file was 'recreated' in the buffer pool; this could happen, for example, if a table was dropped, and the page used later

--- innobase/buf/buf0buf.c
+++ innobase/buf/buf0buf.c
@@ -1762,6 +1762,15 @@
 	buf_flush_free_margin();

 	frame = block->frame;
+
+	/* Reset to zero the file flush lsn field in the page; if the first
+	page of an ibdata file is 'created' in this function into the buffer
+	pool then we lose the original contents of the file flush lsn stamp.
+	Then InnoDB could in a crash recovery print a big, false, corruption
+	warning if the stamp contains an lsn bigger than the ib_logfile lsn. */
+
+	memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8);
+
 #ifdef UNIV_DEBUG
 	buf_dbg_counter++;