Changeset 7c3fb9b in mainline for uspace/lib/bithenge/src/sequence.c


Ignore:
Timestamp:
2018-05-17T08:29:01Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ff23ff
Parents:
fac0ac7
git-author:
Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
Message:

Fix block comment formatting (ccheck).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/bithenge/src/sequence.c

    rfac0ac7 r7c3fb9b  
    150150
    151151        if (index == self->num_ends) {
    152                 /* We can apply the subtransform and cache its prefix length at
    153                  * the same time. */
     152                /*
     153                 * We can apply the subtransform and cache its prefix length at
     154                 * the same time.
     155                 */
    154156                bithenge_node_t *blob_node;
    155157                bithenge_blob_inc_ref(self->blob);
     
    418420        struct_node_t *node = node_as_struct(base);
    419421
    420         /* Treat the scope carefully because of the circular reference. In
     422        /*
     423         * Treat the scope carefully because of the circular reference. In
    421424         * struct_transform_make_node, things are set up so node owns a
    422425         * reference to the scope, but scope doesn't own a reference to node,
    423          * so node's reference count is too low. */
     426         * so node's reference count is too low.
     427         */
    424428        bithenge_scope_t *scope = seq_node_scope(struct_as_seq(node));
    425429        if (scope->refs == 1) {
    426                 /* Mostly normal destroy, but we didn't inc_ref(node) for the
     430                /*
     431                 * Mostly normal destroy, but we didn't inc_ref(node) for the
    427432                 * scope in struct_transform_make_node, so make sure it doesn't
    428                  * try to dec_ref. */
     433                 * try to dec_ref.
     434                 */
    429435                scope->current_node = NULL;
    430436                seq_node_destroy(struct_as_seq(node));
    431437        } else if (scope->refs > 1) {
    432                 /* The scope is still needed, but node isn't otherwise needed.
     438                /*
     439                 * The scope is still needed, but node isn't otherwise needed.
    433440                 * Switch things around so scope owns a reference to node, but
    434                  * not vice versa, and scope's reference count is too low. */
     441                 * not vice versa, and scope's reference count is too low.
     442                 */
    435443                bithenge_node_inc_ref(base);
    436444                bithenge_scope_dec_ref(scope);
    437445                return;
    438446        } else {
    439                 /* This happens after the previous case, when scope is no
     447                /*
     448                 * This happens after the previous case, when scope is no
    440449                 * longer used and is being destroyed. Since scope is already
    441450                 * being destroyed, set it to NULL here so we don't try to
    442                  * destroy it twice. */
     451                 * destroy it twice.
     452                 */
    443453                struct_as_seq(node)->scope = NULL;
    444454                seq_node_destroy(struct_as_seq(node));
     
    501511        node->prefix = prefix;
    502512
    503         /* We should inc_ref(node) here, but that would make a cycle. Instead,
     513        /*
     514         * We should inc_ref(node) here, but that would make a cycle. Instead,
    504515         * we leave it 1 too low, so that when the only remaining use of node
    505516         * is the scope, node will be destroyed. Also see the comment in
    506          * struct_node_destroy. */
     517         * struct_node_destroy.
     518         */
    507519        bithenge_scope_set_current_node(inner, struct_as_node(node));
    508520        bithenge_scope_dec_ref(inner);
     
    591603 * @param[out] out Stores the created transform.
    592604 * @param subtransforms The subtransforms and field names.
    593  * @return EOK on success or an error code from errno.h. */
     605 * @return EOK on success or an error code from errno.h.
     606 */
    594607errno_t bithenge_new_struct(bithenge_transform_t **out,
    595608    bithenge_named_transform_t *subtransforms)
     
    869882 * @param expr Used to calculate the number of times @a xform will be applied.
    870883 * May be NULL, in which case @a xform will be applied indefinitely.
    871  * @return EOK on success or an error code from errno.h. */
     884 * @return EOK on success or an error code from errno.h.
     885 */
    872886errno_t bithenge_repeat_transform(bithenge_transform_t **out,
    873887    bithenge_transform_t *xform, bithenge_expression_t *expr)
     
    11141128 * @param expr Applied in the result of each application of @a xform to
    11151129 * determine whether there will be more.
    1116  * @return EOK on success or an error code from errno.h. */
     1130 * @return EOK on success or an error code from errno.h.
     1131 */
    11171132errno_t bithenge_do_while_transform(bithenge_transform_t **out,
    11181133    bithenge_transform_t *xform, bithenge_expression_t *expr)
Note: See TracChangeset for help on using the changeset viewer.