Search:

Type: Posts; User: beheadedmyway

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. most definitely helpful. it actually coming full...

    most definitely helpful. it actually coming full circle in that I knew to use the standard int types - but didn't realize their purpose was for exactly the problem I thought I had and was trying to...
  2. got it. makes sense. and actually as I was...

    got it. makes sense. and actually as I was reading more in the stdint header and the stdint wiki article - stdint is around to solve this exact problem - ensuring the correct width of a type through...
  3. thanks everyone for the help. if anyone has any...

    thanks everyone for the help. if anyone has any other suggestions or criticisms please let me know. it's definitely appreciated.
  4. cool thanks. makes sense. and thanks for the...

    cool thanks. makes sense. and thanks for the reminder about endianness. I did use big endian.
  5. and I think tabstop might have answered my...

    and I think tabstop might have answered my question earlier - that if a machine has uint8,uint16, etc, it's guaranteed to be that size.
  6. I guess maybe I should change my question...

    I guess maybe I should change my question slightly. or maybe i'm not understanding you correctly. I'm not concerned about sending it. what I'm concerned about is that when the source code is built on...
  7. I see what you mean for network programming -...

    I see what you mean for network programming - it's up to both programmers to ensure that for example; if some piece of data in the stream is 32 bits the other programming should make sure to read 32...
  8. Thanks. yeah that's what I'm always thinking in...

    Thanks. yeah that's what I'm always thinking in the back of my mind. But I can never find any concrete references on dealing with these types of situations.
  9. Thanks - that's kind of what I was thinking but I...

    Thanks - that's kind of what I was thinking but I always run into little snippets that say no machine is guaranteed to have types of the "standard" size - of course I run into that in books from the...
  10. hey renzokuken01, Sorry if I came off like I...

    hey renzokuken01,

    Sorry if I came off like I was trying to impress. There's always something in C that i'm trying to understand better. In this case I don't quite understand how to make sure that...
  11. c serializer - approaches to cross machine support

    Hey All!

    I've been working on really really nice c serializer that's just about done. I slightly re-invented the wheel because I didn't like my options, and they didn't have some features I...
  12. I know you're not on a mac, and this might not be...

    I know you're not on a mac, and this might not be 100% useful for you. But another person pointed out what I believe is the problem.

    On mac, an unbalanced pthread_rwlock_unlock is actually...
  13. no go.. darn. would it have anything to do with...

    no go.. darn. would it have anything to do with the number of cores on the machine?

    I tried your code on my mac, two cores - where it deadlocks. And tried it on a linux box with 3 cores, where it...
  14. yep, I took your compile comment verbatim. gcc...

    yep, I took your compile comment verbatim.

    gcc gg.c -Wall -pedantic -std=c99 -pthread -D_XOPEN_SOURCE=700
  15. oh yeah saw that note about readers being...

    oh yeah saw that note about readers being recursive. for some reason the combination of recursive read locks with write locks is the problem. If I comment out the stuff that initiates the writers...
  16. ps. are you on a mac? and this is seriously not...

    ps. are you on a mac? and this is seriously not to throw flames into the fire at all. your code is right on, but on a mac initiating read locks from a thread that already has a read lock creates...
  17. ha. yeah I didn't care about memory. It was a...

    ha. yeah I didn't care about memory. It was a sandboxed example like I mentioned. I think we were onto the same thing. Like I said it was a sandbox example that i've been messing with. not like I was...
  18. what I meant was that what you were pointing out...

    what I meant was that what you were pointing out to be an issue wasn't the problem. It was indeed the the write lock.

    Here's another version that's fixed. I've run this over and over and have not...
  19. that's definitely not the issue. I've made an...

    that's definitely not the issue. I've made an even simpler example that still creates the deadlock.





    //gcc -Wall rdwr4.c

    #include <stdlib.h>
    #include <stdbool.h>
  20. pthread reader / writer recursion question

    Hey All, got a quick question about pthread read/write lock with regards to their recursive abilities.

    I'm working on a test to demonstrate how you can lock structures with read/write locks....
  21. Replies
    1
    Views
    3,353

    nvmnd, I think everything was working as...

    nvmnd, I think everything was working as expected, I updated the print statements to help be more identifiable and everything is working as I thought it would...




    #include <stdlib.h>...
  22. Replies
    1
    Views
    3,353

    pthread reader/write locks question

    I'm just messing around with mutex and rwlock in pthreads. I wrote a quick little sample. but what's interesting is that the rwlock behaves much differently.



    #include <stdlib.h>
    #include...
  23. Replies
    2
    Views
    1,179

    doh! thanks!

    doh! thanks!
  24. Replies
    2
    Views
    1,179

    c offsetof macro. quick question

    I'm screwing around with the macro offsetof. Just for the sake of screwing around with it. I can't figure out one piece. Here's my code:




    #include <stdlib.h>
    #include <stdio.h>
    #include...
  25. Thanks

    Thanks
Results 1 to 25 of 35
Page 1 of 2 1 2