~ubuntu-branches/ubuntu/lucid/xenomai/lucid

« back to all changes in this revision

Viewing changes to ksrc/skins/native/syscall.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-06-24 22:17:01 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090624221701-mwnah8aj90zmp6uj
Tags: 2.4.8-2ubuntu1
* Merge from debian unstable (LP: #391918), remaining changes:
  - Add lpia to supported architectures.
  - debian/rules: Create file for debhelper to pick up, use debhelper to
    install it.
  - debian/libxenomai1.dirs: Do not create directory.
  - debian/libxenomai1.preinst: Remove symlink on upgrade, remove old udev.
    rule unless modified in which case move to new name.
  - debian/libxenomai1.postinst: Do not create symlink.
  - debian/libxenomai1.postrm: No symlink to remove.
  - Bump build-depend on debhelper to install udev rules into
    /lib/udev/rules.d, add Breaks on udev to get correct version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        __xn_copy_from_user(curr, &timeout, (void __user *)__xn_reg_arg3(regs),
74
74
                            sizeof(timeout));
75
75
 
76
 
        err = xnregistry_bind(name, timeout, handlep);
 
76
        err = xnregistry_bind(name, timeout, XN_RELATIVE, handlep);
77
77
 
78
78
        if (!err) {
79
79
                xnlock_get_irqsave(&nklock, s);
2140
2140
        if (!q)
2141
2141
                err = -ESRCH;
2142
2142
        else {
2143
 
                err = rt_queue_delete(q);       /* Callee will check the queue
2144
 
                                                   descriptor for validity again. */
 
2143
                /* Callee will check the queue descriptor for validity again. */
 
2144
                err = rt_queue_delete_inner(q, (void __user *)ph.mapbase);
2145
2145
                if (!err && q->cpid)
2146
2146
                        xnfree(q);
2147
2147
        }
2324
2324
{
2325
2325
        RT_QUEUE_PLACEHOLDER ph;
2326
2326
        void __user *buf, *mbuf;
 
2327
        int mode, ret;
2327
2328
        RT_QUEUE *q;
2328
2329
        size_t size;
2329
 
        int mode;
2330
2330
 
2331
2331
        if (!__xn_access_ok(curr, VERIFY_READ, __xn_reg_arg1(regs), sizeof(ph)))
2332
2332
                return -EFAULT;
2358
2358
                __xn_copy_from_user(curr, mbuf, buf, size);
2359
2359
        }
2360
2360
 
2361
 
        return rt_queue_send(q, mbuf, size, mode);
 
2361
        ret = rt_queue_send(q, mbuf, size, mode);
 
2362
        if (ret == 0 && (mode & Q_BROADCAST))
 
2363
                rt_queue_free(q, mbuf); /* Nobody received, free the buffer. */
 
2364
 
 
2365
        return ret;
2362
2366
}
2363
2367
 
2364
2368
/*
2668
2672
        if (!heap)
2669
2673
                err = -ESRCH;
2670
2674
        else {
2671
 
                err = rt_heap_delete(heap);     /* Callee will check the heap
2672
 
                                                   descriptor for validity again. */
 
2675
                /* Callee will check the heap descriptor for validity again. */
 
2676
                err = rt_heap_delete_inner(heap, (void __user *)ph.mapbase);
2673
2677
                if (!err && heap->cpid)
2674
2678
                        xnfree(heap);
2675
2679
        }
3454
3458
{
3455
3459
        RT_PIPE_PLACEHOLDER ph;
3456
3460
        RT_PIPE *pipe;
3457
 
        int err;
3458
3461
 
3459
3462
        if (!__xn_access_ok(curr, VERIFY_READ, __xn_reg_arg1(regs), sizeof(ph)))
3460
3463
                return -EFAULT;
3467
3470
        if (!pipe)
3468
3471
                return -ESRCH;
3469
3472
 
3470
 
        err = rt_pipe_delete(pipe);
3471
 
 
3472
 
        if (!err && pipe->cpid)
3473
 
                xnfree(pipe);
3474
 
 
3475
 
        return err;
 
3473
        return rt_pipe_delete(pipe);
3476
3474
}
3477
3475
 
3478
3476
/*