Search:

Type: Posts; User: sleith

Search: Search took 0.00 seconds.

  1. that's ok, i appreciate u, thx :)

    that's ok, i appreciate u, thx :)
  2. i dont understand what did u mean >.< the 'a'...

    i dont understand what did u mean >.<

    the 'a' variable is any variable that would like to be synchronized.
    usually we may write it like this :



    public int Test(){
    ...
  3. which one run first, destructor or return method

    For example i have a class mutex :


    class Mutex
    {
    pthread_mutex_t & mMutex;
    public:
    Mutex(pthread_mutex_t & m):mMutex(m)
    {
    pthread_mutex_lock(&mMutex);
  4. Thread: sig_atomic_t

    by sleith
    Replies
    3
    Views
    2,112

    i mean if there's two thread using the...

    i mean if there's two thread using the sig_atomic_t for synchronization instead of mutex.
  5. Thread: sig_atomic_t

    by sleith
    Replies
    3
    Views
    2,112

    sig_atomic_t

    i have couple of questions about sig_atomic_t
    1. if the first declaration variable of sig_atomic_t is 0 (without assigning the 0 value, just declare like sig_atomic_t atomic; )?
    2. suppose i have...
  6. Replies
    14
    Views
    6,514

    I try to send the signal for three times from...

    I try to send the signal for three times from self or from another program, and the signal SIGSEGV is blockable. Is it different because the system is not really SIGSEGV?
    Maybe i should sigaction...
  7. Replies
    14
    Views
    6,514

    hm.. if SIGSEGV is unblockable, then i should do...

    hm.. if SIGSEGV is unblockable, then i should do with your suggest.
    ok thanks for your advice mats :)
  8. Replies
    14
    Views
    6,514

    Yes that's the situation. Of course the program...

    Yes that's the situation. Of course the program should not produce segfault, but as a programmer i would like to do how to handling such thing if it happens. Btw, what makes my blocking signal code...
  9. Replies
    14
    Views
    6,514

    the unblocking signal is just to handling in case...

    the unblocking signal is just to handling in case when other modules using this ipc module is doing SIGSEGV.
    So the point is the ipc module is SAFE that guaranteed no segv or another thing happened...
  10. Replies
    14
    Views
    6,514

    i think i cant do that. Because the process...

    i think i cant do that. Because the process inside the semaphore cannot be partly done.
    That's why i think it's better using signal block.
  11. Replies
    14
    Views
    6,514

    i have a shared memory that used by many module....

    i have a shared memory that used by many module.
    To make it safe, of course i use semaphore.
    Before calling the semaphore to do the operation, i would like to block the signal (like SIGSEGV) first....
  12. Replies
    14
    Views
    6,514

    blocking SIGSEGV

    i'm trying to block SIGSEGV, but don't know why the signal is not blocked.
    This is my code :


    #include <iostream>
    #include <signal.h>
    #include <errno.h>

    using namespace std;
  13. Replies
    2
    Views
    2,922

    thx for the reply it's been solved, i did a...

    thx for the reply
    it's been solved, i did a wrong logic >.<
  14. Replies
    2
    Views
    2,922

    nonblocking send need help

    Hi, im in trouble with nonblocking send. When i set server to nonblocking send, the client is not received all the data, there's something missing. I have used my own buffer to make sure all the data...
  15. Replies
    4
    Views
    1,864

    Hm..ok2 i undestand now. Thx :D

    Hm..ok2 i undestand now. Thx :D
  16. Replies
    4
    Views
    1,864

    what i'm trying to do is to test why after i run...

    what i'm trying to do is to test why after i run testing() for 1 time, the memory is not going down (i use top to see my memory). It's supposed to be freed.
    But if i run testing() more than 1 time...
  17. Replies
    4
    Views
    1,864

    need help with malloc-free

    this is my code :


    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>

    #define JUMLAH 1000000
    #define ISI 100
Results 1 to 17 of 17